pre-start script echo PRE START end script script touch /tmp/test while true do if ! test -e /tmp/test then exit fi sleep 2 done end script respawn pre-stop script echo PRE_STOPPING rm -f /tmp/test sleep 10 echo PRE_STOPPED end script post-stop script echo POST_STOPPING sleep 10 echo POST_STOPPED end script console output