[CalendarServer-changes] [5218] CalendarServer/trunk/run

source_changes at macosforge.org source_changes at macosforge.org
Thu Feb 25 16:59:26 PST 2010


Revision: 5218
          http://trac.macosforge.org/projects/calendarserver/changeset/5218
Author:   dre at apple.com
Date:     2010-02-25 16:59:25 -0800 (Thu, 25 Feb 2010)
Log Message:
-----------
fix run -k

Modified Paths:
--------------
    CalendarServer/trunk/run

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2010-02-25 19:59:57 UTC (rev 5217)
+++ CalendarServer/trunk/run	2010-02-26 00:59:25 UTC (rev 5218)
@@ -157,7 +157,15 @@
   fi;
 
   if "${kill}" || "${restart}"; then
+    # mimic logic of 'fullServerPath' from twistedcaldav/config.py to find the pid file
     pidfile="$(conf_read_key "PIDFile")";
+    serverroot="$(conf_read_key "ServerRoot")";
+    runroot="$(conf_read_key "RunRoot")";
+    # examine first character of $pidfile
+    if ( [ "${pidfile:0:1}" == "/" ] || [ "${pidfile:0:1}" == "." ]; ) then
+        pidfile=$pidfile;
+        else pidfile=${serverroot}/${runroot}/${pidfile};
+    fi
     if [ ! -r "${pidfile}" ]; then
       echo "Unreadable PID file: ${pidfile}";
       exit 1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100225/dff045a7/attachment-0001.html>


More information about the calendarserver-changes mailing list