jfinal做成服务启动方式

2022-11-22 08:05
1885
0

vim /etc/systemd/system/jfinal.service 添加如下内容:
[Unit]
Description = JFinal Service
After = network.target

[Service]
Type = forking
ExecStart = /app/jfinal-com/jfinal-for-systemctl.sh start

[Install]
WantedBy = multi-user.target

    执行命令:systemctl disable jfinal   如果以前没添加过则无需这行
             systemctl daemon-reload
             systemctl enable jfinal
             systemctl daemon-reload    可不加这行
             reboot   重启前可通过 systemctl start jfinal / systemctl stop jfinal 看看配置是否成功

全部评论