#!/sbin/runscript pidfile="/var/run/fetchmail/${RC_SVCNAME}.pid" rcfile="/etc/${RC_SVCNAME}rc" fidfile="/var/lib/fetchmail/${RC_SVCNAME}.fetchids" depend() { need net use mta } checkconfig() { if [ ! -f ${rcfile} ]; then eerror "Configuration file ${rcfile} not found" return 1 fi } start() { checkconfig || return 1 ebegin "Starting ${RC_SVCNAME}" start-stop-daemon --start --pidfile ${pidfile} \ --user fetchmail --exec /usr/bin/fetchmail \ -- -d ${polling_period} -f ${rcfile} \ --pidfile ${pidfile} -i ${fidfile} eend ${?} } stop() { ebegin "Stopping ${RC_SVCNAME}" start-stop-daemon --stop --quiet --pidfile ${pidfile} eend ${?} }