jLinux

Untitled

Dec 29th, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. # FILE: start.sh
  2.  
  3. #!/bin/bash -ex
  4.  
  5. PRODUCTION=1 forever start -a --uid "hapiplugins" --killSignal=SIGTERM -c node index.js
  6. # PRODUCTION=1 nohup node -max-old-space-size=8192 index.js &
  7. echo $! > .pid
  8.  
  9.  
  10. # FILE: stop.sh
  11.  
  12. #!/bin/bash -ex
  13.  
  14. PRODUCTION=1 forever start -a --uid "hapiplugins" --killSignal=SIGTERM -c node index.js
  15. # PRODUCTION=1 nohup node -max-old-space-size=8192 index.js &
  16. echo $! > .pid
  17. MacBooks-MacBook-Air:hapi-plugins.com jhyland$ cat scripts/stop.sh
  18. #!/bin/bash -ex
  19.  
  20. kill -SIGINT `cat .pid`
  21. killall node
  22.  
  23. # FILE: restart.sh
  24.  
  25. #!/bin/bash -ex
  26.  
  27. # kill -SIGINT `cat .pid`
  28. killall node
  29. # PRODUCTION=1 nohup node -max-old-space-size=8192 index.js &
  30. PRODUCTION=1 forever start -a --uid "hapiplugins" --killSignal=SIGTERM -c node index.js
  31. echo $! > .pid
Advertisement
Add Comment
Please, Sign In to add comment