#!/bin/sh

case "$1" in
	start)
		echo -n "Starting cron ... "
		start-stop-daemon -S -q -m -b -p /var/run/dcron.pid --exec /usr/sbin/crond -- -f
		echo "done."
		;;
	stop)
		echo -n "Stopping cron ..."
		start-stop-daemon -K -q -p /var/run/dcron.pid
		echo "done."
		;;
	restart)
		$0 stop
		sleep 1
		$0 start
		;;
	*)
		echo "usage: $0 {start|stop|restart}"
		;;
esac
