summarylogtreecommitdiffstats
path: root/powershield.service
blob: ea51c85bb503b76f261b1bc9b91e12ac2b1ea2da (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
[Unit]
Description=The UPSMON daemon control the UPS.
After=syslog.target network-online.target

[Service]
Type=forking
ExecStartPre=+-/usr/bin/chgrp --silent powershield /opt/upsmon
ExecStartPre=+-/usr/bin/chmod --silent g+rw /opt/upsmon
ExecStartPre=+-/usr/bin/chgrp --silent powershield /opt/upsmon/event.log
ExecStartPre=+-/bin/bash -c '/usr/bin/chgrp --silent powershield /opt/upsmon/data_*.log'
ExecStart=/opt/upsmon/upsagent -start
WorkingDirectory=/opt/upsmon
ReadWritePaths=/opt/upsmon
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
PrivateUsers=true
ProtectKernelTunables=true
ProtectKernelLogs=true
ProtectControlGroups=true
DeviceAllow=char-ttyS rw
DeviceAllow=char-ttyUSB rw
DeviceAllow=char-ttyACM rw
DeviceAllow=char-rfcomm rw
DynamicUser=true
SupplementaryGroups=uucp
UMask=0113
User=powershield
Group=powershield

[Install]
WantedBy=multi-user.target