abraunegg-onedrive/contrib/systemd/onedrive@.service.in
Enno G 89d2085c69
Add SystemD hardening (#1720)
* Add SystemD hardening

Co-authored-by: abraunegg <alex.braunegg@gmail.com>
2021-11-25 06:28:46 +11:00

28 lines
707 B
SYSTEMD

[Unit]
Description=OneDrive Free Client for %i
Documentation=https://github.com/abraunegg/onedrive
After=network-online.target
Wants=network-online.target
[Service]
# Commented out hardenings are disabled because they don't work out of the box.
# If you know what you are doing please try to enable them.
ProtectSystem=full
#PrivateDevices=true
ProtectHostname=true
#ProtectClock=true
ProtectKernelTunables=true
#ProtectKernelModules=true
#ProtectKernelLogs=true
ProtectControlGroups=true
RestrictRealtime=true
ExecStart=@prefix@/bin/onedrive --monitor --confdir=/home/%i/.config/onedrive
User=%i
Group=users
Restart=on-failure
RestartSec=3
RestartPreventExitStatus=3
[Install]
WantedBy=multi-user.target