#!/sbin/runscript depend() { need bar provide foo } start() { ebegin "Starting foo" /sbin/foo eend $? "Failed to start foo" } stop() { ebegin "Stopping foo" kill $(cat /var/run/foo.pid) eend $? "Failed to stop foo" }