# -*- upstart -*-

# Upstart configuration script for "mod-gearman-worker".

description "mod_gearman workers"

start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]

respawn

exec start-stop-daemon --start --chuid nagios --exec /usr/sbin/mod_gearman_worker -- --config=/etc/mod-gearman/worker.conf

post-stop script
pkill -9 -u nagios -f mod_gearman_worker || true
end script
