summarylogtreecommitdiffstats
path: root/scrutiny-collector-metrics.service
blob: 155d5a87cb1ec3f7edd7cc39134bddb47ebb4901 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
[Unit]
Description=Scrutiny Collector - Metrics
After=network-online.target

[Service]
Type=oneshot
User=root
Group=root
LogsDirectory=scrutiny-collector-metrics
EnvironmentFile=-/etc/conf.d/scrutiny-collector-metrics
ExecStart=/usr/bin/scrutiny-collector-metrics run --config /etc/scrutiny-collector-metrics/scrutiny-collector-metrics.yaml --log-file /var/log/scrutiny-collector-metrics/scrutiny-collector-metrics.log

NoNewPrivileges=true
SystemCallArchitectures=native
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=strict
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectHostname=yes
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
RemoveIPC=yes

# smartctl apparently doesn't function properly with this protection in place
#ProtectClock=yes

[Install]
WantedBy=multi-user.target