all repos — proxmox-ansible @ 2333a9a68b8081ad4fbb1b7979eaf81b5f6777c4

better service files
Marco Andronaco andronacomarco@gmail.com
Fri, 03 Feb 2023 09:44:38 +0100
commit

2333a9a68b8081ad4fbb1b7979eaf81b5f6777c4

parent

629e13945c5ed652d26b3cd4b8604618d055884f

2 files changed, 8 insertions(+), 4 deletions(-)

jump to
M roles/node_stuff/templates/node.service.j2roles/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.j2roles/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 }}