start 392 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. ps waux | grep node | grep -v grep
  3. echo "starting ..."
  4. if [ "$(id -u)" != "0" ]; then
  5. ## note: start as root, pass env vars to sudo param, this app will downgrade itself once it has initialized
  6. sudo -E forever app.js &> log.txt &
  7. else
  8. forever app.js &> log.txt &
  9. fi
  10. cd etherpad-lite/node
  11. forever server.js &> log.txt &
  12. cd ../..
  13. sleep 3
  14. ps waux | grep node | grep -v grep