Библиотека ansible плейбуков на разные случаи
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
708 B

description "{{ service_description }}"
start on runlevel [2345]
stop on runlevel [!2345]
expect fork
kill timeout 60 # when upstart issued a stop, send SIGTERM, wait 60 sec before sending SIGKILL
respawn
respawn limit 5 30 #try 5 times within 60 seconds, or giveup
script
echo $$ > {{installation_path}}/app.pid
exec {{ interpretator }} {{ installation_path}}/app.py
end script
pre-start script
touch {{installation_path}}/app.log
echo "\n[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Starting" >> {{installation_path}}/app.log
end script
pre-stop script
rm -f {{installation_path}}/app.pid
echo "[`date -u +%Y-%m-%dT%T.%3NZ`] (sys) Stopping" >> {{installation_path}}/app.log
end script