小编use*_*349的帖子

用于启动我的应用服务器的 systemd 脚本 - “Unit”部分中的未知左值“StartLimitIntervalSec”

我有一个如下所示的新贵配置文件,它在 Ubuntu 14 中运行良好:

#/etc/init/data_server.conf
#sudo start data_server
#sudo stop data_server
#sudo status data_server

start on runlevel [2345]
stop on runlevel [016]

chdir /opt/hold/data_server
respawn

post-start script
    echo "data server started at `date +"%F %T"` on `hostname -f`" | mailx -r "abc@host.com" -s "data server Started" "pqr@host.com"
end script

post-stop script
  sleep 30
end script

limit core unlimited unlimited
limit nofile 100000 100000
setuid goldy
exec ./proc_server --init_file=../config/tree.init --port=8080 --dir=/data/hold/ --max_sec=2400 --max_mb=100 --active=5
Run Code Online (Sandbox Code Playgroud)

现在我们正在迁移到 Ubuntu 16,所以我们不能使用upstart,看起来我们需要在systemd这里使用。我必须确保每当系统重新启动或应用程序被终止时,它应该 …

linux upstart systemd ubuntu-16.04

11
推荐指数
1
解决办法
2万
查看次数

标签 统计

linux ×1

systemd ×1

ubuntu-16.04 ×1

upstart ×1