[CalendarServer-changes] [12444] CalendarServer/trunk/bin/run
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:20:50 PDT 2014
Revision: 12444
http://trac.calendarserver.org//changeset/12444
Author: wsanchez at apple.com
Date: 2014-01-23 18:04:35 -0800 (Thu, 23 Jan 2014)
Log Message:
-----------
Starting server works
Modified Paths:
--------------
CalendarServer/trunk/bin/run
Modified: CalendarServer/trunk/bin/run
===================================================================
--- CalendarServer/trunk/bin/run 2014-01-24 01:49:00 UTC (rev 12443)
+++ CalendarServer/trunk/bin/run 2014-01-24 02:04:35 UTC (rev 12444)
@@ -40,6 +40,17 @@
# Usage
#
+ config="${wd}/conf/caldavd-dev.plist";
+ reactor="";
+ plugin_name="caldav";
+service_type="Combined";
+ run="true";
+ daemonize="-X -L";
+ kill="false";
+ restart="false";
+ profile="";
+
+
usage () {
program="$(basename "$0")";
@@ -78,42 +89,39 @@
# Parse command-line options to set up state which controls the behavior of the
# functions in build.sh.
parse_options () {
- kill="false";
- restart="false";
-
OPTIND=1;
while getopts "ahsfnpedkrK:i:I:b:t:S:P:R:" option; do
case "${option}" in
'?') usage; ;;
'h') usage -; exit 0; ;;
- # 'f') force_setup="true"; ;;
- 'k') kill="true"; ;;
- 'r') restart="true"; ;;
- 'd') daemonize=""; ;;
- 'P') plugin_name="${OPTARG}"; ;;
- 'R') reactor="-R ${OPTARG}"; ;;
- 't') service_type="${OPTARG}"; ;;
- 'K') read_key="${OPTARG}"; ;;
- 'S') profile="-p ${OPTARG}"; ;;
- 's') do_get="true" ; do_setup="true" ; do_run="false"; ;;
+ # 'f') force_setup="true"; ;;
+ 'k') kill="true"; ;;
+ 'r') restart="true"; ;;
+ 'd') daemonize=""; ;;
+ 'P') plugin_name="${OPTARG}"; ;;
+ 'R') reactor="-R ${OPTARG}"; ;;
+ 't') service_type="${OPTARG}"; ;;
+ 'K') read_key="${OPTARG}"; ;;
+ 'S') profile="-p ${OPTARG}"; ;;
+ 's') setup="true" ; run="false"; ;;
# 'p')
- # do_get="false"; do_setup="false"; do_run="false"; print_path="true";
+ # do_get="false"; setup="false"; run="false"; print_path="true";
# ;;
# 'e')
- # do_get="false"; do_setup="false"; do_run="false"; print_path="true";
+ # do_get="false"; setup="false"; run="false"; print_path="true";
# print_environment="true";
# ;;
# 'i')
# do_get="true";
- # do_setup="true";
- # do_run="false";
+ # setup="true";
+ # run="false";
# install="${OPTARG}";
# install_flag="--root=";
# ;;
# 'I')
# do_get="true";
- # do_setup="true";
- # do_run="false";
+ # setup="true";
+ # run="false";
# install="${wd}/build/dst";
# install_flag="--root=";
# install_home="${OPTARG}";
@@ -121,12 +129,12 @@
# 'b')
# do_bundle="true";
# do_get="true";
- # do_setup="true";
- # do_run="false";
+ # setup="true";
+ # run="false";
# install="${OPTARG}";
# install_flag="--root=";
# ;;
- 'n') do_get="false" ; do_setup="false"; ;;
+ 'n') setup="false"; ;;
esac;
done;
shift $((${OPTIND} - 1));
@@ -141,7 +149,7 @@
run () {
echo "Using ${python} as Python";
- if "${do_run}"; then
+ if "${run}"; then
if [ ! -f "${config}" ]; then
echo "";
echo "Missing config file: ${config}";
@@ -172,8 +180,15 @@
mkdir "${wd}/data";
fi;
+ if [ "$(uname -s)" == "Darwin" ] && [ "$(uname -r | cut -d . -f 1)" -ge 9 ]; then
+ caldavd_wrapper_command="launchctl bsexec /";
+ else
+ caldavd_wrapper_command="";
+ fi;
+
echo "";
echo "Starting server...";
+ export PYTHON="${python}";
exec ${caldavd_wrapper_command} \
"${wd}/bin/caldavd" ${daemonize} \
-f "${config}" \
@@ -227,7 +242,7 @@
init_build > /dev/null;
- if "${do_setup}"; then
+ if "${setup}"; then
c_dependencies >> "${dev_home}/setup.log";
py_dependencies >> "${dev_home}/setup.log";
fi;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/b71c136e/attachment.html>
More information about the calendarserver-changes
mailing list