Skip to content

Instantly share code, notes, and snippets.

@higebu higebu/vpnserver
Created Mar 10, 2014

Embed
What would you like to do?
SoftEther VPN Server init script for Debian
#!/bin/sh
### BEGIN INIT INFO
# Provides: vpnserver
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# 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
@wbruninx

This comment has been minimized.

Copy link

commented Dec 30, 2016

Add the lines to the case statement...

status)
[ -f $LOCK ] && echo exit 0 || exit 1
;;

The following service command will generate the right status for the vpnservice e.g. + or - instead of ?

service --status-all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.