summaryrefslogtreecommitdiffstats
path: root/network/mullvadvpn-app/rc.mullvad
diff options
context:
space:
mode:
Diffstat (limited to 'network/mullvadvpn-app/rc.mullvad')
-rw-r--r--network/mullvadvpn-app/rc.mullvad34
1 files changed, 34 insertions, 0 deletions
diff --git a/network/mullvadvpn-app/rc.mullvad b/network/mullvadvpn-app/rc.mullvad
new file mode 100644
index 0000000000..427f2e3fe6
--- /dev/null
+++ b/network/mullvadvpn-app/rc.mullvad
@@ -0,0 +1,34 @@
+#!/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
+