@@ -38,20 +38,20 @@
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
mod_gearman_worker_BIN=/usr/bin/mod_gearman_worker
-PIDFILE=/var/run/mod_gearman/mod_gearman_worker.pid
-CONFIG=/etc/mod_gearman_worker.conf
+MOD_GM_PIDFILE=/var/run/mod_gearman/mod_gearman_worker.pid
+MOD_GM_CONFIG=/etc/mod_gearman_worker.conf
test -x $mod_gearman_worker_BIN || { echo "$mod_gearman_worker_BIN not installed";
if [ "$1" = "stop" ]; then exit 0;
else exit 5; fi; }
# Check for existence of needed config file and read it
-mod_gearman_worker_CONFIG=/etc/sysconfig/mod_gearman_worker
-test -r $mod_gearman_worker_CONFIG || { echo "$mod_gearman_worker_CONFIG not existing";
+mod_gearman_worker_MOD_GM_CONFIG=/etc/sysconfig/mod_gearman_worker
+test -r $mod_gearman_worker_MOD_GM_CONFIG || { echo "$mod_gearman_worker_MOD_GM_CONFIG not existing";
if [ "$1" = "stop" ]; then exit 0;
else exit 6; fi; }
# Read config
-. $mod_gearman_worker_CONFIG
+. $mod_gearman_worker_MOD_GM_CONFIG
# Source LSB init functions
# providing start_daemon, killproc, pidofproc,
@@ -99,7 +99,7 @@
echo -n "Starting mod_gearman_worker "
## Start daemon with startproc(8). If this fails
## the return value is set appropriately by startproc.
- /sbin/startproc -u ${USERID} $mod_gearman_worker_BIN -d --config=${CONFIG} --pidfile=${PIDFILE}
+ /sbin/startproc -u ${MOD_GM_USERID} $mod_gearman_worker_BIN -d --config=${MOD_GM_CONFIG} --pidfile=${MOD_GM_PIDFILE}
# Remember status and be verbose
rc_status -v
@@ -109,7 +109,7 @@
## Stop daemon with killproc(8) and if this fails
## killproc sets the return value according to LSB.
- /sbin/killproc -TERM $mod_gearman_worker_BIN -p ${PIDFILE}
+ /sbin/killproc -TERM $mod_gearman_worker_BIN -p ${MOD_GM_PIDFILE}
# Remember status and be verbose
rc_status -v
@@ -193,7 +193,7 @@
## argument to this init script which is required for a reload.
## Note: probe is not (yet) part of LSB (as of 1.9)
- test /etc/mod_gearman_worker.conf -nt ${PIDFILE} && echo reload
+ test /etc/mod_gearman_worker.conf -nt ${MOD_GM_PIDFILE} && echo reload
;;
*)
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
|