Skip to content

Instantly share code, notes, and snippets.

@akhiljalagam
Created November 21, 2018 14:41
Show Gist options
  • Save akhiljalagam/e0facdd9c3d14d3339cb40ce0ba6ad0c to your computer and use it in GitHub Desktop.
Save akhiljalagam/e0facdd9c3d14d3339cb40ce0ba6ad0c to your computer and use it in GitHub Desktop.
#!/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