2016-11-07 00:54:32 +01:00
|
|
|
[Unit]
|
2016-12-28 21:52:19 +01:00
|
|
|
Description=Rest Server
|
2016-11-07 00:54:32 +01:00
|
|
|
After=syslog.target
|
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
|
Type=simple
|
|
|
|
|
User=www-data
|
|
|
|
|
Group=www-data
|
2020-09-13 14:04:21 +02:00
|
|
|
ExecStart=/usr/local/bin/rest-server --path /path/to/backups
|
2016-11-07 00:54:32 +01:00
|
|
|
Restart=always
|
|
|
|
|
RestartSec=5
|
2021-04-02 19:45:37 +01:00
|
|
|
# Makes created files group-readable, but inaccessible by others
|
|
|
|
|
UMask=027
|
2016-11-07 00:54:32 +01:00
|
|
|
|
2021-04-02 19:45:37 +01:00
|
|
|
# Recommended security enhancements using features present in systemd version 247
|
|
|
|
|
CapabilityBoundingSet=
|
|
|
|
|
LockPersonality=true
|
|
|
|
|
MemoryDenyWriteExecute=true
|
2020-09-13 14:04:21 +02:00
|
|
|
NoNewPrivileges=yes
|
|
|
|
|
PrivateTmp=yes
|
2021-04-02 19:45:37 +01:00
|
|
|
PrivateDevices=true
|
|
|
|
|
PrivateUsers=true
|
2020-09-13 14:04:21 +02:00
|
|
|
ProtectSystem=strict
|
|
|
|
|
ProtectHome=yes
|
2021-04-02 19:45:37 +01:00
|
|
|
ProtectClock=true
|
|
|
|
|
ProtectControlGroups=true
|
|
|
|
|
ProtectKernelLogs=true
|
|
|
|
|
ProtectKernelModules=true
|
|
|
|
|
ProtectKernelTunables=true
|
|
|
|
|
ProtectProc=invisible
|
|
|
|
|
ProtectHostname=true
|
|
|
|
|
ProcSubset=pid
|
2020-09-13 14:04:21 +02:00
|
|
|
ReadWritePaths=/path/to/backups
|
2021-04-02 19:45:37 +01:00
|
|
|
RemoveIPC=true
|
|
|
|
|
RestrictNamespaces=true
|
|
|
|
|
RestrictAddressFamilies=AF_INET AF_INET6
|
|
|
|
|
RestrictSUIDSGID=true
|
|
|
|
|
RestrictRealtime=true
|
|
|
|
|
SystemCallArchitectures=native
|
|
|
|
|
SystemCallFilter=@system-service
|
2020-09-13 14:04:21 +02:00
|
|
|
|
2016-11-07 00:54:32 +01:00
|
|
|
[Install]
|
|
|
|
|
WantedBy=multi-user.target
|