6 PID
=`cat /var/run/caldavd/caldavd.pid 2>/dev/null`
9 stat_busy
"Starting Calendarserver"
10 if [ -z "$PID" ]; then
11 cd /opt
/caldavd
/CalendarServer
12 USER
=root .
/run
-d >/dev
/null
2>/dev
/null
&
14 if [ ! -z "$PID" ]; then
17 PID
=`pidof -o %PPID /usr/bin/caldavd`
18 echo $PID > /var
/run
/calendarserver.pid
19 add_daemon calendarserver
24 stat_busy
"Stopping Calendarserver"
25 [ ! -z "$PID" ] && kill $PID &> /dev
/null
29 rm_daemon calendarserver
39 echo "usage: $0 {start|stop|restart}"