Browse files

added log to nodejs.sh

  • Loading branch information...
1 parent 347ae17 commit 61f5ef53636b360d17b6482b10fdfae66f28f8cb @shimondoodkin committed Jul 6, 2010
Showing with 7 additions and 5 deletions.
  1. +7 −5 nodejs.sh
View
12 nodejs.sh
@@ -3,20 +3,22 @@
while true;
do
- echo starting;
+ echo starting $(date);
script_directory=`dirname "$0"`;
cd $script_directory;
- /usr/local/bin/node server.js;
+ touch /var/log/nodejs.log
+ chmod 777 /var/log/nodejs.log
+ /usr/local/bin/node server.js > /var/log/nodejs.log 2>&1;
exit_value="$?" ;
- echo stopping;
+ echo stopping $(date);
if [ "$exit_value" != "0" ]; then
- sleep 3;
+ sleep 5;
else
- sleep 1;
+ sleep 0;
fi ;
done;

0 comments on commit 61f5ef5

Please sign in to comment.