Guest User

Untitled

a guest
Jul 20th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. [davidp@shakermaker:~]$ cat /etc/init.d/site-ijedomestics
  2. #! /bin/sh
  3.  
  4. # Simple script for starting Dancer applications.
  5.  
  6. SITENAME=ijedomestics
  7. PORT=5000
  8. DIR=/websites/ijedomestics
  9. SCRIPT=ijedomestics.pl
  10. USER=davidp
  11.  
  12. PIDFILE=/var/run/site-$SITENAME.pid
  13.  
  14. case "$1" in
  15. start)
  16. start-stop-daemon --start --chuid $USER --chdir $DIR \
  17. --pidfile=$PIDFILE \
  18. --exec /usr/local/bin/starman -- -p $PORT $SCRIPT -D --pid $PIDFILE
  19. ;;
  20. stop)
  21. start-stop-daemon --stop --pidfile $PIDFILE
  22. ;;
  23. *)
  24. echo "Usage: $SCRIPTNAME {start|stop}" >&2
  25. exit 3
  26. ;;
  27. esac
  28.  
  29. :
Add Comment
Please, Sign In to add comment