Skip to content

Instantly share code, notes, and snippets.

@yuuichi-fujioka
Created December 16, 2014 23:53
Show Gist options
  • Save yuuichi-fujioka/84d0f48ec033454e9b85 to your computer and use it in GitHub Desktop.
Save yuuichi-fujioka/84d0f48ec033454e9b85 to your computer and use it in GitHub Desktop.
vpnclient init script
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Client
DAEMON=/usr/local/vpnclient/vpnclient
LOCK=/var/lock/subsys/vpnclient
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
touch $LOCK
;;
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