Skip to content

Instantly share code, notes, and snippets.

@kayshinonome
Created July 30, 2021 21:22
Show Gist options
  • Select an option

  • Save kayshinonome/0de13c9364730f3a7e1a01a3396c1133 to your computer and use it in GitHub Desktop.

Select an option

Save kayshinonome/0de13c9364730f3a7e1a01a3396c1133 to your computer and use it in GitHub Desktop.
Proton VPN openrc script (/etc/init.d/protonvpn)
#!/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