# upstart configuration for lbcd.  -*- upstart -*-

description "Responder for load balancing"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
expect stop
setuid lbcd
setgid lbcd

pre-start script
    test -x /usr/sbin/lbcd || { stop; exit 0; }
end script

# To change the default lbcd service, specify a command to run for the
# weight and interval, or do round-robin (-R), add the flags to DAEMON_OPTS
# in /etc/default/lbcd.  This will ensure consistent behavior across all
# init systems.
script
    if [ -f /etc/default/lbcd ] ; then
        . /etc/default/lbcd
    fi
    exec /usr/sbin/lbcd -f -l -Z $DAEMON_OPTS
end script
