linux upstart启动配置

程序名.conf
放在/etcc/init/目录下
# 注释
description "your-server"
author "xxx"

start on runlevel [2345]
stop on runlevel [!2345]

respawn
#重试5次 间隔30秒
respawn limit 5 30

env WORKPATH=/usr/local/bin/
env DAEMON=/usr/local/bin/appName

script
cd $WORKPATH
exec $DAEMON
end script

转载于:https://www.cnblogs.com/Tiago/p/5940816.html

你可能感兴趣的:(linux upstart启动配置)