#!/sbin/runscript # Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 bin=/usr/sbin/ippoold pid=/var/run/ippool.pid [ -z "${IPPOOLD_CONFIG_FILE}" ] && IPPOOLD_CONFIG_FILE="/etc/ippool.conf" depend() { need portmap } start(){ ebegin "Starting ippoold" start-stop-daemon --start --quiet --exec ${bin} --pidfile ${pid} \ --make-pidfile --background -- -R -f # it is possible to not to have config at all if [ -r "${IPPOOLD_CONFIG_FILE}" ]; then sleep 0.5 /usr/bin/ippoolconfig config restore file="${IPPOOLD_CONFIG_FILE}" fi eend $? } stop(){ ebegin "Stopping ippoold" start-stop-daemon --stop --quiet --exec ${bin} --pidfile ${pid} eend $? }