| 1 | #!/sbin/openrc-run |
| 2 | description="innernet VPN client service" |
| 3 | |
| 4 | # To manage the wireguard interface named "ifname", link this file |
| 5 | # to /etc/init.d/innernet.ifname and start that service |
| 6 | interface="${RC_SVCNAME##*.}" |
| 7 | |
| 8 | command="/usr/sbin/innernet" |
| 9 | command_args="up $interface --daemon ${command_extra_args:---interval 60}" |
| 10 | command_background=true |
| 11 | pidfile="/run/${RC_SVCNAME}.pid" |
| 12 | |
| 13 | stop_post() { |
| 14 | $command down $interface |
| 15 | } |
| 16 | |
| 17 | depend() { |
| 18 | use net |
| 19 | } |