mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-22 10:45:15 +03:00
25 lines
507 B
Text
Executable file
25 lines
507 B
Text
Executable file
#!/sbin/openrc-run
|
|
|
|
VPN=${SVCNAME#*.}
|
|
if [ ${SVCNAME} != "quicktun" ]; then
|
|
pidfile="/var/run/quicktun.${VPN}.pid"
|
|
else
|
|
pidfile="/var/run/quicktun.pid"
|
|
fi
|
|
|
|
command=/usr/bin/quicktun
|
|
|
|
start() {
|
|
if [ -e "/etc/quicktun/${VPN}.conf" ]
|
|
then
|
|
source "/etc/quicktun/${VPN}.conf"
|
|
else
|
|
eerror "Config /etc/quicktun/${VPN}.conf not found"
|
|
exit 1
|
|
fi
|
|
|
|
ebegin "Starting ${SVCNAME}"
|
|
start-stop-daemon --start --exec ${command} --pidfile ${pidfile} \
|
|
--background --make-pidfile
|
|
eend $?
|
|
}
|