Skip to content

Commit

Permalink
updating script for boot/restart
Browse files Browse the repository at this point in the history
  • Loading branch information
josephsnow committed Nov 15, 2011
1 parent 11583c8 commit af66e39
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions start
Expand Up @@ -3,9 +3,13 @@
ps waux | grep node | grep -v grep ps waux | grep node | grep -v grep


echo "starting ..." echo "starting ..."
## note: start as root, pass env vars to sudo param, this app will downgrade itself once it has initialized
sudo -E forever app.js &> log.txt &


if [ "$(id -u)" != "0" ]; then
## note: start as root, pass env vars to sudo param, this app will downgrade itself once it has initialized
sudo -E forever app.js &> log.txt &
else
forever app.js &> log.txt &
fi


cd etherpad-lite/node cd etherpad-lite/node
forever server.js &> log.txt & forever server.js &> log.txt &
Expand Down
2 changes: 1 addition & 1 deletion util/reboot-restart.sh
Expand Up @@ -12,6 +12,6 @@ rm /data/db/mongod.lock


pushd . pushd .
cd /home/ec2-user/fc cd /home/ec2-user/fc
cat restart | sudo -u ec2-user sh ./restart
popd popd


0 comments on commit af66e39

Please sign in to comment.