Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. #!/sbin/runscript
  2.  
  3. DAEMON=/usr/local/sbin/ocserv
  4. PIDFILE=/var/run/ocserv.pid
  5. LOGFILE=/var/log/ocserv.log
  6. DAEMON_ARGS="-f -d 1"
  7.  
  8. extra_commands="debug"
  9.  
  10. depend() {
  11. use net
  12. }
  13.  
  14. debug() {
  15. LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib $DAEMON $DAEMON_ARGS
  16. }
  17.  
  18. start() {
  19. ebegin "Starting OpenConnect VPN Server"
  20. start-stop-daemon --start --quiet --background \
  21. --env LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib \
  22. --stdout $LOGFILE \
  23. --stderr $LOGFILE \
  24. --exec $DAEMON -- $DAEMON_ARGS
  25. eend $?
  26. }
  27.  
  28. stop() {
  29. ebegin "Stoping OpenConnect VPN Server"
  30. kill -9 `cat $PIDFILE`
  31. eend $?
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement