-
-
Save tracyhatemice/1c3fa04c7d4884a15759 to your computer and use it in GitHub Desktop.
/etc/init.d/ocserv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/runscript | |
DAEMON=/usr/local/sbin/ocserv | |
PIDFILE=/var/run/ocserv.pid | |
LOGFILE=/var/log/ocserv.log | |
DAEMON_ARGS="-f -d 1" | |
extra_commands="debug" | |
depend() { | |
use net | |
} | |
debug() { | |
$DAEMON $DAEMON_ARGS | |
} | |
start() { | |
ebegin "Starting OpenConnect VPN Server" | |
start-stop-daemon --start --quiet --background \ | |
--stdout $LOGFILE \ | |
--stderr $LOGFILE \ | |
--exec $DAEMON -- $DAEMON_ARGS | |
eend $? | |
} | |
stop() { | |
ebegin "Stoping OpenConnect VPN Server" | |
[ ! -f $PIDFILE ] || { kill -9 `cat $PIDFILE` && rm -rf $PIDFILE ; } | |
eend $? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment