mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
a8f7a34683
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
34 lines
723 B
Bash
34 lines
723 B
Bash
#!/bin/sh
|
|
#
|
|
# /etc/rc.d/rc.mullvad
|
|
#
|
|
# Start/stop/restart - Mullvad VPN Service.
|
|
#
|
|
# To make Mullvad VPN start automatically at boot, make this
|
|
# file executable: chmod 755 /etc/rc.d/rc.mullvad
|
|
#
|
|
# and also you must add this to /etc/rc.d/rc.local to
|
|
# start MullvadVPN:
|
|
#
|
|
# if [ -x /etc/rc.d/rc.mullvad ]; then
|
|
# /etc/rc.d/rc.mullvad start
|
|
# fi
|
|
|
|
|
|
case "$1" in
|
|
'start')
|
|
/usr/bin/mullvad-daemon -v >/dev/null &
|
|
;;
|
|
'stop')
|
|
pkill -f /usr/bin/mullvad-daemon >/dev/null &
|
|
# Remove both possible .pid locations:
|
|
rm -f /var/run/mullvad-vpn.pid /var/run/mullvad-vpn/mullvad-vpn.pid
|
|
;;
|
|
'restart')
|
|
/usr/bin/mullvad-daemon -v >/dev/null &
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
;;
|
|
esac
|
|
|