Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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() {
- LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib $DAEMON $DAEMON_ARGS
- }
- start() {
- ebegin "Starting OpenConnect VPN Server"
- start-stop-daemon --start --quiet --background \
- --env LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib \
- --stdout $LOGFILE \
- --stderr $LOGFILE \
- --exec $DAEMON -- $DAEMON_ARGS
- eend $?
- }
- stop() {
- ebegin "Stoping OpenConnect VPN Server"
- kill -9 `cat $PIDFILE`
- eend $?
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement