add systemd config files

This commit is contained in:
surtur 2022-03-22 14:12:32 +01:00
parent 83b6023d32
commit aca942856c
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 43 additions and 0 deletions

@ -0,0 +1,39 @@
# /etc/systemd/system/grafana.service
[Unit]
Description=Grafana
After=nginx.service docker.service
[Service]
Delegate=no
; Restart=on-failure
Restart=always
RestartSec=10
ExecStart=/usr/bin/docker-compose -p grafana -f /etc/grafana/docker-compose.yml up
ExecStop=/usr/bin/docker-compose -p grafana -f /etc/grafana/docker-compose.yml stop
CapabilityBoundingSet=
SystemCallFilter=~memfd_create
ProtectProc=invisible
ProtectHome=true
RestrictNamespaces=uts ipc pid user cgroup
NoNewPrivileges=True
#SecureBits=noroot-locked
ProtectSystem=strict
DevicePolicy=closed
PrivateTmp=true
PrivateDevices=true
PrivateUsers=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
LockPersonality=true
MemoryDenyWriteExecute=true
RestrictRealtime=true
RestrictSUIDSGID=true
SystemCallArchitectures=native
[Install]
WantedBy=multi-user.target

@ -0,0 +1,4 @@
# /etc/systemd/system/grafana.service.d/override.conf
# grafana service override
[Unit]
OnFailure=status_email_wanderer@%n