Set restart policies

This commit is contained in:
Alex 2020-06-04 14:37:46 +02:00
parent ac55d40cd9
commit 64e64e6b03
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
7 changed files with 28 additions and 3 deletions

View File

@ -1,8 +1,14 @@
[Unit]
StartLimitIntervalSec=0
[Service] [Service]
ExecStart= 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 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 # TODO: Store or provision a set of plugins, prefferably the latter
Restart=on-failure
RestartSec=10
ProtectSystem=strict ProtectSystem=strict
PrivateUsers=true PrivateUsers=true
NoNewPrivileges=yes NoNewPrivileges=yes

View File

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

View File

@ -1,3 +1,9 @@
[Unit]
StartLimitIntervalSec=0
[Service] [Service]
ExecStart= 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 }}" 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

View File

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

View File

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

View File

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

View File

@ -1,3 +1,10 @@
[Unit]
StartLimitIntervalSec=0
[Service] [Service]
Restart=on-failure
RestartSec=10
ExecStart= 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 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