summaryrefslogtreecommitdiff
path: root/media-tv/jellyfin/files/jellyfin.init.d
diff options
context:
space:
mode:
authorGuillermo Ramos2020-11-12 19:09:00 +0100
committerGuillermo Ramos2020-11-12 19:09:00 +0100
commit4398202c71bce3258187b49a72dfbb10bc99f49e (patch)
treed496a1acf285d19ecff79b3593089205d815067a /media-tv/jellyfin/files/jellyfin.init.d
parent359c272de001021408e9f782cd5866410d4c439f (diff)
downloadgentoo-overlay-4398202c71bce3258187b49a72dfbb10bc99f49e.tar.gz
Add jellyfin from aten, with EAPI=7
Diffstat (limited to 'media-tv/jellyfin/files/jellyfin.init.d')
-rwxr-xr-xmedia-tv/jellyfin/files/jellyfin.init.d32
1 files changed, 32 insertions, 0 deletions
diff --git a/media-tv/jellyfin/files/jellyfin.init.d b/media-tv/jellyfin/files/jellyfin.init.d
new file mode 100755
index 0000000..7ce8f54
--- /dev/null
+++ b/media-tv/jellyfin/files/jellyfin.init.d
@@ -0,0 +1,32 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="Jellyfin Media Server"
+
+user="${JELLYFIN_USER}:${JELLYFIN_USER}"
+
+start_stop_daemon_args="--user $user --wait 10"
+
+command="/usr/bin/jellyfin"
+command_args="--configdir $JELLYFIN_CONFIG_DIR
+ --datadir $JELLYFIN_DATA_DIR
+ --cachedir $JELLYFIN_CACHE_DIR
+ --logdir $JELLYFIN_LOG_DIR
+ $JELLYFIN_ARGS"
+
+command_background="true"
+
+pidfile="/run/jellyfin.pid"
+
+depend() {
+ need net
+ after bootmisc
+}
+
+start_pre() {
+ checkpath --directory --owner $user $JELLYFIN_CONFIG_DIR
+ checkpath --directory --owner $user $JELLYFIN_DATA_DIR
+ checkpath --directory --owner $user $JELLYFIN_CACHE_DIR
+ checkpath --directory --owner $user $JELLYFIN_LOG_DIR
+}