Skip to content

Instantly share code, notes, and snippets.

@studiomohawk
Created March 4, 2015 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save studiomohawk/bae8642e2e9ded50a0bc to your computer and use it in GitHub Desktop.
Save studiomohawk/bae8642e2e9ded50a0bc to your computer and use it in GitHub Desktop.
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Client
DAEMON=/home/vagrant/vpnclient/vpnclient
LOCK=/var/lock/subsys/vpnclient
IFUP=/sbin/ifup
IFDOWN=/sbin/ifdown VPN=vpn_vpn
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
sleep 5
$IFDOWN $VPN
sleep 10
$IFUP $VPN
;;
stop)
$DAEMON stop
rm $LOCK
;;
restart)
$DAEMON stop
sleep 3
$DAEMON start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment