summaryrefslogtreecommitdiff
path: root/www-apps/sonarr/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-07-11 01:28:44 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-07-11 01:28:44 +0100
commitb46b9834b3fbf80b22ccc12e95f660512cd0fa75 (patch)
treef7eb18ccc89e078e2f175e5249fe0d4dfdb5b104 /www-apps/sonarr/files
parent62f7102650b24618880e8e6f08fcb8fbd235025b (diff)
gentoo auto-resync : 11:07:2022 - 01:28:44
Diffstat (limited to 'www-apps/sonarr/files')
-rw-r--r--www-apps/sonarr/files/sonarr.init8
-rw-r--r--www-apps/sonarr/files/sonarr.logrotate7
-rw-r--r--www-apps/sonarr/files/sonarr.service30
3 files changed, 45 insertions, 0 deletions
diff --git a/www-apps/sonarr/files/sonarr.init b/www-apps/sonarr/files/sonarr.init
new file mode 100644
index 000000000000..2ca5082cfbc0
--- /dev/null
+++ b/www-apps/sonarr/files/sonarr.init
@@ -0,0 +1,8 @@
+#!/sbin/openrc-run
+
+pidfile="/run/sonarr.pid"
+command="mono"
+command_args="/opt/sonarr/Sonarr.exe"
+command_user="sonarr:sonarr"
+command_background=true
+
diff --git a/www-apps/sonarr/files/sonarr.logrotate b/www-apps/sonarr/files/sonarr.logrotate
new file mode 100644
index 000000000000..3d374d3ad3c2
--- /dev/null
+++ b/www-apps/sonarr/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/NzbDrone/logs/*.txt{
+ missingok
+ su sonarr sonarr
+}
diff --git a/www-apps/sonarr/files/sonarr.service b/www-apps/sonarr/files/sonarr.service
new file mode 100644
index 000000000000..562ad1229fd8
--- /dev/null
+++ b/www-apps/sonarr/files/sonarr.service
@@ -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=/usr/bin/mono /opt/sonarr/Sonarr.exe
+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