parent
b6df140d94
commit
38205b9e47
@ -1,42 +0,0 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
description="WireGuard VPN tunnel"
|
||||
required_dirs="/etc/wireguard"
|
||||
|
||||
WIREGUARD=
|
||||
name=$RC_SVCNAME
|
||||
command="/usr/bin/wg-quick"
|
||||
extra_started_commands="up down"
|
||||
command_user="root"
|
||||
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
|
||||
command_background="yes"
|
||||
|
||||
depend() {
|
||||
need localmount
|
||||
need net
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
checkpath --directory --owner $command_user:$command_user --mode 0775 \
|
||||
/run/$RC_SVCNAME /var/log/$RC_SVCNAME
|
||||
}
|
||||
|
||||
up() {
|
||||
${command} up $WIREGUARD
|
||||
}
|
||||
|
||||
down() {
|
||||
${command} down $WIREGUARD
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting wireguard"
|
||||
up
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping wireguard"
|
||||
down
|
||||
eend $?
|
||||
}
|
||||
Loading…
Reference in new issue