You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/02/26 11:20:44 UTC

svn commit: r631159 - /lenya/zone/bin/nightly-docu.sh

Author: andreas
Date: Tue Feb 26 02:20:43 2008
New Revision: 631159

URL: http://svn.apache.org/viewvc?rev=631159&view=rev
Log:
Stop server only if PID file exists.

Modified:
    lenya/zone/bin/nightly-docu.sh

Modified: lenya/zone/bin/nightly-docu.sh
URL: http://svn.apache.org/viewvc/lenya/zone/bin/nightly-docu.sh?rev=631159&r1=631158&r2=631159&view=diff
==============================================================================
--- lenya/zone/bin/nightly-docu.sh (original)
+++ lenya/zone/bin/nightly-docu.sh Tue Feb 26 02:20:43 2008
@@ -22,9 +22,13 @@
 #first, kill running Lenya instance
 echo >> $logfile
 echo "#first, kill running lenya instance" >> $logfile 
-DOCU_PID=`cat /export/home/lenya/bin/lenya-docu.pid`
-ps -ef |grep lenya|grep $DOCU_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh >> $logfile
-rm /export/home/lenya/bin/lenya-docu.pid  >> $logfile
+
+pid_file=/export/home/lenya/bin/lenya-docu.pid
+if test -f $pid_file
+  DOCU_PID=`cat /export/home/lenya/bin/lenya-docu.pid`
+  ps -ef |grep lenya|grep $DOCU_PID|grep -v grep|awk '{print "kill -9 "$2}'|sh >> $logfile
+  rm $pid_file  >> $logfile
+fi
 
 echo "#starting" >> $logfile 2>&1
 ./lenya.sh servlet >> $logfile 2>&1 &



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org