Created
November 21, 2018 14:41
-
-
Save akhiljalagam/e0facdd9c3d14d3339cb40ce0ba6ad0c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: softether-vpnclient | |
# Required-Start: $network | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start VPN Client at boot time | |
# description: Start VPN Client at boot time. | |
# processname: softether-vpnclient | |
### END INIT INFO | |
PATH=$PATH | |
VPNCLIENT= | |
case "$1" in | |
start) | |
echo "Starting VPN Client" | |
$VPNCLIENT/vpnclient start | |
sleep 5 | |
dhclient vpn_softether | |
;; | |
stop) | |
echo "Stopping VPN Client" | |
$VPNCLIENT/vpnclient stop | |
;; | |
*) | |
echo "Usage: /etc/init.d/softether-vpnclient {start|stop}" | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment