better service files
Marco Andronaco andronacomarco@gmail.com
Fri, 03 Feb 2023 09:44:38 +0100
2 files changed,
8 insertions(+),
4 deletions(-)
M
roles/node_stuff/templates/node.service.j2
→
roles/node_stuff/templates/node.service.j2
@@ -4,8 +4,10 @@ After=syslog.target network.target
[Service] Type=simple -Restart=always -RestartSec=1 +Restart=on-failure +StartLimitBurst=2 +# Restart, but not more than once every x seconds: 30=30s, 600=10m +StartLimitInterval=30 WorkingDirectory={{ repo_dir }}{{ item }} ExecStart=/usr/bin/npm start User={{ user }}
M
roles/python_stuff/templates/python.service.j2
→
roles/python_stuff/templates/python.service.j2
@@ -4,8 +4,10 @@ After=syslog.target network.target
[Service] Type=simple -Restart=always -RestartSec=1 +Restart=on-failure +StartLimitBurst=2 +# Restart, but not more than once every x seconds: 30=30s, 600=10m +StartLimitInterval=30 WorkingDirectory={{ repo_dir }}{{ item }} ExecStart={{ repo_dir }}{{ item }}/venv/bin/python {{ repo_dir }}{{ item }}/main.py User={{ user }}