summaryrefslogtreecommitdiff
path: root/www-apps/sonarr-bin/files
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/sonarr-bin/files')
-rw-r--r--www-apps/sonarr-bin/files/sonarr.init-r27
-rw-r--r--www-apps/sonarr-bin/files/sonarr.logrotate7
-rw-r--r--www-apps/sonarr-bin/files/sonarr.service-r130
3 files changed, 44 insertions, 0 deletions
diff --git a/www-apps/sonarr-bin/files/sonarr.init-r2 b/www-apps/sonarr-bin/files/sonarr.init-r2
new file mode 100644
index 000000000000..76b8dbed164b
--- /dev/null
+++ b/www-apps/sonarr-bin/files/sonarr.init-r2
@@ -0,0 +1,7 @@
+#!/sbin/openrc-run
+
+pidfile="/run/sonarr.pid"
+command="/opt/sonarr/Sonarr"
+command_user="${GROUP:-sonarr}:${USER:-sonarr}"
+command_background=true
+
diff --git a/www-apps/sonarr-bin/files/sonarr.logrotate b/www-apps/sonarr-bin/files/sonarr.logrotate
new file mode 100644
index 000000000000..9514fa02651e
--- /dev/null
+++ b/www-apps/sonarr-bin/files/sonarr.logrotate
@@ -0,0 +1,7 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+/var/lib/sonarr/.config/Sonarr/logs/*.txt{
+ missingok
+ su sonarr sonarr
+}
diff --git a/www-apps/sonarr-bin/files/sonarr.service-r1 b/www-apps/sonarr-bin/files/sonarr.service-r1
new file mode 100644
index 000000000000..542f5d7f1031
--- /dev/null
+++ b/www-apps/sonarr-bin/files/sonarr.service-r1
@@ -0,0 +1,30 @@
+[Unit]
+Description=Sonarr is a Smart PVR for newsgroup and bittorrent users.
+After=syslog.target network.target network-online.target
+
+[Service]
+User=sonarr
+Group=sonarr
+
+Type=simple
+ExecStart=/opt/sonarr/Sonarr
+TimeoutStopSec=20
+KillMode=process
+Restart=on-failure
+
+PrivateTmp=yes
+PrivateDevices=yes
+PrivateMounts=yes
+ProtectHome=yes
+ProtectSystem=full
+NoNewPrivileges=yes
+ProtectHostname=yes
+ProtectClock=yes
+ProtectKernelTunables=yes
+ProtectKernelModules=yes
+ProtectKernelLogs=yes
+ProtectControlGroups=yes
+RestrictRealtime=yes
+
+[Install]
+WantedBy=multi-user.target