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

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 14 17:01:31 PDT 2013


Revision: 10927
          http://trac.calendarserver.org//changeset/10927
Author:   sagen at apple.com
Date:     2013-03-14 17:01:31 -0700 (Thu, 14 Mar 2013)
Log Message:
-----------
Update run to use the new calendarserver_config

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

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2013-03-14 22:09:15 UTC (rev 10926)
+++ CalendarServer/trunk/run	2013-03-15 00:01:31 UTC (rev 10927)
@@ -190,20 +190,15 @@
 
   # If we've been asked to read a configuration key, just read it and exit.
   if [ -n "${read_key}" ]; then
-    "${caldav}/bin/calendarserver_config" "${read_key}";
+    value="$("${caldav}/bin/calendarserver_config" "${read_key}")";
+    IFS="="; set ${value}; echo "$2"; unset IFS;
     exit $?;
   fi;
 
   if "${kill}" || "${restart}"; then
-    # mimic logic of 'fullServerPath' from twistedcaldav/config.py to find the pid file
     pidfile="$("${caldav}/bin/calendarserver_config" "PIDFile")";
-    serverroot="$("${caldav}/bin/calendarserver_config" "ServerRoot")";
-    runroot="$("${caldav}/bin/calendarserver_config" "RunRoot")";
-    # examine first character of $pidfile
-    if ( [ "${pidfile:0:1}" == "/" ] || [ "${pidfile:0:1}" == "." ]; ) then
-        pidfile=$pidfile;
-        else pidfile=${serverroot}/${runroot}/${pidfile};
-    fi
+    # Split key and value on "=" and just grab the value
+    IFS="="; set ${pidfile}; pidfile="$2"; unset IFS;
     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/20130314/e5cb8d30/attachment-0001.html>


More information about the calendarserver-changes mailing list