| 1 |
[Unit] |
| 2 |
Description=Mirrorbits Redirector (%i) |
| 3 |
Documentation=https://github.com/videolabs/mirrorbits/wiki |
| 4 |
After=network.target |
| 5 |
ConditionPathExists=/etc/mirrorbits/%i.conf |
| 6 |
|
| 7 |
[Service] |
| 8 |
Type=notify |
| 9 |
User=mirrorbits |
| 10 |
Group=mirrorbits |
| 11 |
ConfigurationDirectory=mirrorbits |
| 12 |
LogsDirectory=mirrorbits/%i |
| 13 |
RuntimeDirectory=mirrorbits/%i |
| 14 |
|
| 15 |
Environment=DAEMON_ARGS= |
| 16 |
ExecStart=/usr/bin/mirrorbits daemon -config ${CONFIGURATION_DIRECTORY}/%i.conf \ |
| 17 |
-log ${LOGS_DIRECTORY}/daemon.log -p ${RUNTIME_DIRECTORY}/pid $DAEMON_ARGS |
| 18 |
ExecReload=/bin/kill -HUP $MAINPID |
| 19 |
ExecStop=-/bin/kill -QUIT $MAINPID |
| 20 |
TimeoutStopSec=5 |
| 21 |
KillMode=mixed |
| 22 |
Restart=on-failure |
| 23 |
|
| 24 |
CapabilityBoundingSet= |
| 25 |
LockPersonality=true |
| 26 |
MemoryDenyWriteExecute=true |
| 27 |
NoNewPrivileges=true |
| 28 |
PrivateDevices=true |
| 29 |
PrivateTmp=true |
| 30 |
PrivateUsers=true |
| 31 |
ProtectClock=true |
| 32 |
ProtectControlGroups=true |
| 33 |
ProtectHome=true |
| 34 |
ProtectHostname=true |
| 35 |
ProtectKernelLogs=true |
| 36 |
ProtectKernelModules=true |
| 37 |
ProtectKernelTunables=true |
| 38 |
ProtectProc=invisible |
| 39 |
ProtectSystem=strict |
| 40 |
RemoveIPC=true |
| 41 |
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX |
| 42 |
RestrictNamespaces=true |
| 43 |
RestrictRealtime=true |
| 44 |
RestrictSUIDSGID=true |
| 45 |
SystemCallArchitectures=native |
| 46 |
SystemCallFilter=@system-service |
| 47 |
SystemCallFilter=~@privileged |
| 48 |
|
| 49 |
[Install] |
| 50 |
WantedBy=multi-user.target |