6 pid_file
="/var/run/gcaldaemon.pid"
7 JAVA_HOME
=/opt
/java
/jre
8 PATH
=$JAVA_HOME/bin
:/$PATH
12 stat_busy
"Starting GCALDaemon"
13 /opt
/gcaldaemon
/bin
/standalone-start.sh
&> /dev
/null
&
18 PID
=`ps aux | grep -i "java" | grep -i "gcaldaemon" | awk '{print ""$2""}'`
24 stat_busy
"Stopping GCALDaemon"
25 [ -f $pid_file ] && PID
=`cat $pid_file`
26 [ ! -z "$PID" ] || PID
=`ps aux | grep -i "java" | grep -i "gcaldaemon" | awk '{print ""$2""}'`
27 [ -z "$PID" ] ||
kill $PID &> /dev
/null
42 echo "usage: $0 {start|stop|restart}"