summaryrefslogtreecommitdiff
path: root/www-apps/readarr-bin/files
diff options
context:
space:
mode:
Diffstat (limited to 'www-apps/readarr-bin/files')
-rw-r--r--www-apps/readarr-bin/files/readarr.init6
-rw-r--r--www-apps/readarr-bin/files/readarr.logrotate4
-rw-r--r--www-apps/readarr-bin/files/readarr.service30
3 files changed, 40 insertions, 0 deletions
diff --git a/www-apps/readarr-bin/files/readarr.init b/www-apps/readarr-bin/files/readarr.init
new file mode 100644
index 000000000000..88cdbc9f597d
--- /dev/null
+++ b/www-apps/readarr-bin/files/readarr.init
@@ -0,0 +1,6 @@
+#!/sbin/openrc-run
+
+pidfile="/run/readarr.pid"
+command="/opt/readarr/Readarr"
+command_user="readarr:readarr"
+command_background=true
diff --git a/www-apps/readarr-bin/files/readarr.logrotate b/www-apps/readarr-bin/files/readarr.logrotate
new file mode 100644
index 000000000000..4675f682b629
--- /dev/null
+++ b/www-apps/readarr-bin/files/readarr.logrotate
@@ -0,0 +1,4 @@
+/var/lib/readarr/.config/Readarr/logs/*.txt{
+ missingok
+ su readarr readarr
+}
diff --git a/www-apps/readarr-bin/files/readarr.service b/www-apps/readarr-bin/files/readarr.service
new file mode 100644
index 000000000000..c96ba634b514
--- /dev/null
+++ b/www-apps/readarr-bin/files/readarr.service
@@ -0,0 +1,30 @@
+[Unit]
+Description=An ebook and audiobook collection manager for Usenet and BitTorrent users
+After=syslog.target network.target
+
+[Service]
+User=readarr
+Group=readarr
+
+Type=simple
+ExecStart=/opt/readarr/Readarr
+TimeoutStopSec=20
+KillMode=process
+Restart=always
+
+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