Guest User

Untitled

a guest
Jul 22nd, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. ROOT=/webs/services/puller
  4. PIDFILE=/var/run/puller.pid
  5.  
  6. start () {
  7. $ROOT/config.ru --port=1000 --env=production --daemonize --pid $PIDFILE
  8. }
  9.  
  10. stop () {
  11. kill -9 $(cat $PIDFILE)
  12. }
  13.  
  14. case "$1" in
  15. start|"")
  16. start ;;
  17.  
  18. restart)
  19. stop && start ;;
  20.  
  21. stop)
  22. stop ;;
  23.  
  24. *)
  25. echo "Usage: $0 [start|restart|stop]" >&2
  26. exit 1
  27. ;;
  28. esac
Add Comment
Please, Sign In to add comment