2 # Gearman startup script
3 # (C) 2009 - John Gerritse
5 #####################################
9 # source application-specific settings
10 [ -f /etc
/conf.d
/gearmand
] && .
/etc
/conf.d
/gearmand
12 DAEMONBIN
="/usr/sbin/gearmand"
13 DAEMONOPTS
="-u gearman"
14 PID
=`pidof -o %PPID /usr/sbin/gearmand`
18 stat_busy
"Starting gearman daemon "
19 if [ -z "$PID" ]; then
20 $DAEMONBIN $DAEMONOPTS -d $GEARMAN_OPTS
32 stat_busy
"Stopping gearman daemon"
33 [ ! -z "$PID" ] && kill $PID &> /dev
/null
47 echo "usage: $0 {start|stop|restart}"