Skip to content

Instantly share code, notes, and snippets.

@secure-77
Last active January 19, 2021 21:15
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 secure-77/4adfab1c59d2e9de502c9474935d0c63 to your computer and use it in GitHub Desktop.
Save secure-77/4adfab1c59d2e9de502c9474935d0c63 to your computer and use it in GitHub Desktop.
Softether ubuntu service script /etc/init.d/vpnserver
#!/bin/bash
### BEGIN INIT INFO
# Provides: VPNSERVER
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Softether VPN Server
### END INIT INFO
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
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