Eu percebi isso.
description "MyJob"
respawn
# retry 4 times in 3 seconds
# This should ALWAYS be true:
# 4 times * sleep .5 < 3 sec
# Otherwise it will continue respawning forever
respawn limit 4 3
start on runlevel [2345]
stop on runlevel [!2345]
script
exec python /usr/local/bin/myscript.py
end script
post-start script
# Time after starting service should unquestionably be running
sleep .5
if ps fax | grep '[m]yscript' ; then
exit 0
fi
exit 1
end script