summarylogtreecommitdiffstats
path: root/systemd-service
blob: a99748560bac1d0b104c91fd789e3afaeaaf3d15 (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[Unit]
Description=Scaphandre electrical power consumption metrology agent
Wants=network.target
After=network.target

[Service]
ExecStartPre=-+/usr/bin/modprobe intel_rapl_common
ExecStartPre=+/usr/bin/find /sys/devices/virtual/powercap -name energy_uj -exec chmod g+r -R {} + -exec chown root:powercap {} +
ExecStart=/usr/local/bin/scaphandre $SCAPHANDRE_ARGS
EnvironmentFile=/etc/conf.d/scaphandre

CapabilityBoundingSet=CAP_NET_BIND_SERVICE
DevicePolicy=closed
DynamicUser=yes
Group=powercap
IPAccounting=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
MemoryMax=100M
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
RestrictAddressFamilies=AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
SyslogIdentifier=scaphandre
SystemCallFilter=~@cpu-emulation
SystemCallFilter=~@debug
SystemCallFilter=~@keyring
SystemCallFilter=~@module
SystemCallFilter=~@mount
SystemCallFilter=~@obsolete
SystemCallFilter=~@privileged
SystemCallFilter=~@raw-io
SystemCallFilter=~@reboot
SystemCallFilter=~@resources
SystemCallFilter=~@swap
UMask=0777

[Install]
WantedBy=multi-user.target