summaryrefslogtreecommitdiff
path: root/media-tv/jellyfin/files/jellyfin.init.d
diff options
context:
space:
mode:
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
+}