3 # Start Script for running app.js and Etherpad-lite
5 # Kill all node instances
9 export NODE_PATH=/home/risci_atom/fc/etherpad-lite/node_modules:$NODE_MODULES
10 export MONGO_HOST_URI=mongodb://localhost/fc
11 export MONGO_HOST=localhost
12 export SERVER_HOST=www.finalsclub.org
14 export NODE_ENV=production
17 ps waux | grep node | grep -v grep
21 cd fc/etherpad-lite/node
22 forever server.js &> log.txt &
24 if [ "$(id -u)" != "0" ]; then
25 ## note: start as root, pass env vars to sudo param, this app will downgrade itself onc$
26 sudo -E forever app.js &> log.txt &
28 forever app.js &> log.txt &