Browse Source

Set restart policies

master
Alex 1 year ago
parent
commit
64e64e6b03
Signed by: caskd GPG Key ID: F92BA85F61F4C173
  1. 6
      templates/grafana-server.service.j2
  2. 2
      templates/haproxy.service.j2
  3. 6
      templates/hitch.service.j2
  4. 2
      templates/influxdb.service.j2
  5. 6
      templates/telegraf.service.j2
  6. 2
      templates/transmission-daemon.service.j2
  7. 7
      templates/varnish.service.j2

6
templates/grafana-server.service.j2

@ -1,8 +1,14 @@
[Unit]
StartLimitIntervalSec=0
[Service]
ExecStart=
ExecStart=/usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/run/grafana/grafana-server.pid --packaging=deb cfg:default.paths.logs=/var/log/grafana cfg:default.paths.data=/tmp/data cfg:default.paths.plugins=/tmp/plugins cfg:default.paths.provisioning=/tmp/provision
# TODO: Store or provision a set of plugins, prefferably the latter
Restart=on-failure
RestartSec=10
ProtectSystem=strict
PrivateUsers=true
NoNewPrivileges=yes

2
templates/haproxy.service.j2

@ -5,7 +5,7 @@ StartLimitIntervalSec=0
User=varnish
Group=varnish
Restart=always
Restart=on-failure
RestartSec=10
Environment=

6
templates/hitch.service.j2

@ -1,3 +1,9 @@
[Unit]
StartLimitIntervalSec=0
[Service]
ExecStart=
ExecStart=/usr/sbin/hitch --user {{ hitch.user }} --group {{ hitch.group }} --config /etc/hitch/hitch.conf -L 2 --backend="{{ hitch.backend.sock }}" --frontend="[*]:{{ hitch.frontend.port }}"
Restart=on-failure
RestartSec=10

2
templates/influxdb.service.j2

@ -2,7 +2,7 @@
StartLimitIntervalSec=0
[Service]
Restart=always
Restart=on-failure
RestartSec=10
# TODO: Add mounts

6
templates/telegraf.service.j2

@ -1,8 +1,14 @@
[Unit]
StartLimitIntervalSec=0
[Service]
EnvironmentFile=
ExecStart=
ExecStart=/usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d
Restart=on-failure
RestartSec=10
ProtectSystem=strict
NoNewPrivileges=yes
TemporaryFileSystem=/:ro

2
templates/transmission-daemon.service.j2

@ -5,7 +5,7 @@ StartLimitIntervalSec=0
User=root
DynamicUser=true
Restart=always
Restart=on-failure
RestartSec=10
ProtectSystem=strict

7
templates/varnish.service.j2

@ -1,3 +1,10 @@
[Unit]
StartLimitIntervalSec=0
[Service]
Restart=on-failure
RestartSec=10
ExecStart=
ExecStart=/usr/sbin/varnishd -F -a {{ varnish.frontend.sock }},user={{ varnish.frontend.user }},group={{ varnish.frontend.group }},mode={{ varnish.frontend.mode }} -j unix,user={{ varnish.jail.user }} -f /etc/varnish/default.vcl -s malloc,256m