pull/109/head
midoks 3 years ago
parent f100ce2333
commit 0b3878bb42
  1. 2
      class/core/common.py
  2. 5
      scripts/init.d/mw-task.service.tpl
  3. 5
      scripts/init.d/mw.service.tpl

@ -67,6 +67,8 @@ def initInitD():
systemd_mw_tpl = mw.getRunDir() + '/scripts/init.d/mw.service.tpl'
systemd_mw_task_tpl = mw.getRunDir() + '/scripts/init.d/mw-task.service.tpl'
os.remove(systemd_mw)
os.remove(systemd_mw_task)
doContentReplace(systemd_mw_tpl, systemd_mw)
doContentReplace(systemd_mw_task_tpl, systemd_mw_task)

@ -3,8 +3,9 @@ Description=mw-task server daemon
After=network.target
[Service]
Type=forking
ExecStart=cd {$SERVER_PATH} && python3 task.py
Type=simple
WorkingDirectory={$SERVER_PATH}
ExecStart=python3 task.py
ExecStop=kill -HUP $MAINID
ExecReload=kill -HUP $MAINID
KillMode=process

@ -3,8 +3,9 @@ Description=mw server daemon
After=network.target
[Service]
Type=forking
ExecStart=cd {$SERVER_PATH} && gunicorn -c setting.py app:app
Type=simple
WorkingDirectory={$SERVER_PATH}
ExecStart=gunicorn -c setting.py app:app
ExecStop=kill -HUP $MAINID
ExecReload=kill -HUP $MAINID
KillMode=process

Loading…
Cancel
Save