mdserver-web/scripts/init.d/mw.service.tpl

21 lines
423 B
Smarty
Raw Permalink Normal View History

2022-06-17 03:52:52 -04:00
[Unit]
2022-11-10 07:32:17 -05:00
Description=mw-panel daemon
2022-06-17 03:52:52 -04:00
After=network.target
[Service]
2022-06-17 04:36:36 -04:00
Type=simple
2024-12-02 03:28:42 -05:00
WorkingDirectory={$SERVER_PATH}
2022-11-10 08:20:12 -05:00
EnvironmentFile={$SERVER_PATH}/scripts/init.d/service.sh
2024-12-02 03:28:42 -05:00
ExecStart=cd web && gunicorn -c setting.py app:app
2022-06-17 03:52:52 -04:00
ExecStop=kill -HUP $MAINID
ExecReload=kill -HUP $MAINID
KillMode=process
Restart=on-failure
2022-11-10 08:21:55 -05:00
[Timer]
# 每日凌晨点重启
OnCalendar=*-*-* 03:30:00
2022-11-10 08:22:21 -05:00
Unit=mw.service
2022-11-10 08:21:55 -05:00
2022-06-17 03:52:52 -04:00
[Install]
WantedBy=multi-user.target