2020-08-16 13:57:57 +02:00
|
|
|
[Unit]
|
|
|
|
Description=Navidrome Music Server and Streamer compatible with Subsonic/Airsonic
|
|
|
|
After=remote-fs.target network.target
|
|
|
|
AssertPathExists=__CONFIG_PATH__
|
|
|
|
|
|
|
|
[Service]
|
2022-06-23 08:48:19 +02:00
|
|
|
Type=simple
|
2020-08-16 13:57:57 +02:00
|
|
|
User=__APP__
|
|
|
|
Group=__APP__
|
2022-06-23 08:48:19 +02:00
|
|
|
WorkingDirectory=__CONFIG_PATH__/
|
2021-03-24 09:34:07 +01:00
|
|
|
ExecStart=__FINALPATH__/__APP__ --configfile "__CONFIG_PATH__/navidrome.toml"
|
2020-08-16 13:57:57 +02:00
|
|
|
TimeoutStopSec=20
|
|
|
|
KillMode=process
|
|
|
|
Restart=on-failure
|
2022-06-23 08:48:19 +02:00
|
|
|
ReadWritePaths=__CONFIG_PATH__
|
2020-08-16 13:57:57 +02:00
|
|
|
|
|
|
|
# See https://www.freedesktop.org/software/systemd/man/systemd.exec.html
|
|
|
|
NoNewPrivileges=yes
|
|
|
|
PrivateTmp=yes
|
|
|
|
PrivateUsers=yes
|
|
|
|
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
|
|
|
|
RestrictNamespaces=yes
|
|
|
|
RestrictRealtime=yes
|
2022-06-23 08:48:19 +02:00
|
|
|
DevicePolicy=closed
|
2020-08-16 13:57:57 +02:00
|
|
|
ProtectSystem=full
|
2022-06-23 08:48:19 +02:00
|
|
|
ProtectControlGroups=yes
|
|
|
|
ProtectKernelModules=yes
|
|
|
|
ProtectKernelTunables=yes
|
|
|
|
SystemCallFilter=~@clock @debug @module @mount @obsolete @privileged @reboot @setuid @swap
|
2020-08-16 13:57:57 +02:00
|
|
|
|
|
|
|
# You can comment the following line if you don't have any media in /home/*.
|
|
|
|
# This will prevent navidrome from ever reading/writing anything there.
|
2022-06-23 08:48:19 +02:00
|
|
|
#ProtectHome=true
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|