1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-22 16:02:43 +00:00

Touch up the systemd unit to add optional sandboxing parameters

NanoSector 2019-03-10 17:41:05 +01:00
parent d921f7b205
commit 652dd8a9c2

@ -3,7 +3,7 @@
Most modern Linux distributions have switched to systemd, which involves a simple service file which gets enabled and started. Most modern Linux distributions have switched to systemd, which involves a simple service file which gets enabled and started.
### Service File ### Service File
Be sure to change the `User`, `Group` and path for both `mono` and `Radarr.exe` to match your installation. The file should be named `radarr.service` and the best place for it is `/etc/systemd/system/`. Alternative locations like `/usr/lib/systemd/system/` and `/lib/systemd/system/` may depend on the distribution used. Be sure to change the `User`, `Group` and path for both `mono` and `Radarr.exe` to match your installation. The file should be named `radarr.service` and the best place for it is `/etc/systemd/system/`. Alternative locations like `/usr/lib/systemd/system/` and `/lib/systemd/system/` may depend on the distribution used. This example unit assumes that Radarr's executable is placed in `/opt/Radarr`.
``` ```
[Unit] [Unit]
@ -11,15 +11,25 @@ Description=Radarr Daemon
After=syslog.target network.target After=syslog.target network.target
[Service] [Service]
User=user # Change the user and group variables here.
Group=group User=radarr
Group=radarr
Type=simple Type=simple
# Change the path to Radarr or mono here if it is in a different location for you.
ExecStart=/usr/bin/mono --debug /opt/Radarr/Radarr.exe -nobrowser ExecStart=/usr/bin/mono --debug /opt/Radarr/Radarr.exe -nobrowser
TimeoutStopSec=20 TimeoutStopSec=20
KillMode=process KillMode=process
Restart=on-failure Restart=on-failure
# These lines optionally isolate (sandbox) Radarr from the rest of the system.
# Make sure to add any paths it might use to the list below (space-separated).
#ReadWritePaths=/opt/Radarr /path/to/movies/folder
#ProtectSystem=strict
#PrivateDevices=true
#ProtectHome=true
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
``` ```