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

source_changes at macosforge.org source_changes at macosforge.org
Thu Sep 28 15:34:53 PDT 2006


Revision: 220
          http://trac.macosforge.org/projects/calendarserver/changeset/220
Author:   wsanchez at apple.com
Date:     2006-09-28 15:34:53 -0700 (Thu, 28 Sep 2006)

Log Message:
-----------


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

Modified: CalendarServer/trunk/run
===================================================================
--- CalendarServer/trunk/run	2006-09-28 22:34:11 UTC (rev 219)
+++ CalendarServer/trunk/run	2006-09-28 22:34:53 UTC (rev 220)
@@ -66,7 +66,7 @@
     'f')   force_setup="true"; ;;
     'n') disable_setup="true"; ;;
     'p')    print_path="true"; ;;
-    'd')     deamonize=""; ;;
+    'd')     daemonize=""; ;;
     'i')    setup_only="true"; install="${OPTARG}"; install_flag="--root="; ;;
     'I')    setup_only="true"; install="${wd}/build/dst"; install_flag="--root="; install_home="${OPTARG}"; ;;
   esac;
@@ -92,12 +92,19 @@
   python="${PYTHON:=python2.4}";
 fi;
 
-    top="$(cd "${wd}/.." && pwd -L)"
-patches="${wd}/lib-patches";
+if [ -z "${caldav:-}" ]; then
+  caldav="${wd}";
+fi;
+
+    top="$(cd "${caldav}/.." && pwd -L)"
+patches="${caldav}/lib-patches";
 twisted="${top}/Twisted";
     dav="${twisted}/twisted/web2/dav"
- caldav="${wd}";
 
+if [ -z "${config:-}" ]; then
+  config="${wd}/conf/caldavd-dev.plist";
+fi;
+
 if [ -z "${PYTHONPATH:-}" ]; then
   export PYTHONPATH="${caldav}";
 else
@@ -122,21 +129,17 @@
 ##
 
 run () {
-  local server_home="$1"; shift;
+  if "${print_path}"; then
+    echo "${PYTHONPATH}";
+    exit 0;
+  fi;
 
-  if [ "${server_home}" == "${wd}" ]; then
-    if "${print_path}"; then
-      echo "${PYTHONPATH}";
-      exit 0;
-    fi;
-
-    if ! "${setup_only}" && [ "${server_home}" == "${wd}" ]; then
-      cd "${server_home}";
-      exec "${python}" "${wd}/bin/caldavd" "${daemonize}" \
-          -f "${wd}/conf/caldavd-dev.plist"               \
-          -T "${twisted}/bin/twistd"                      \
-          start;
-    fi;
+  if ! "${setup_only}"; then
+    cd "${wd}";
+    exec "${python}" "${caldav}/bin/caldavd" ${daemonize} \
+        -f "${config}"                                    \
+        -T "${twisted}/bin/twistd"                        \
+        start;
   fi;
 }
 
@@ -518,4 +521,4 @@
 # Run the server
 ##
 
-run "${caldav}";
+run;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20060928/86def9d9/attachment.html


More information about the calendarserver-changes mailing list