Created
July 30, 2021 21:22
-
-
Save kayshinonome/0de13c9364730f3a7e1a01a3396c1133 to your computer and use it in GitHub Desktop.
Proton VPN openrc script (/etc/init.d/protonvpn)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/sbin/openrc-run | |
| command="/usr/bin/protonvpn" | |
| # The special RC_SVCNAME variable contains the name of this service. | |
| pidfile="/run/${RC_SVCNAME}.pid" | |
| command_args="c -r" | |
| ping_check() { | |
| ping -c1 8.8.8.8 >/dev/null | |
| rc=$? | |
| } | |
| start_pre() { | |
| ping_check; | |
| while [ ${rc} -ne 0 ]; do | |
| sleep 5 | |
| ping_check; | |
| done; | |
| } | |
| depend() { | |
| need net | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment