You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
864 B
25 lines
864 B
#!/sbin/openrc-run
|
|
|
|
: ${JELLYFIN_CACHE_DIR:=/var/cache/jellyfin}
|
|
: ${JELLYFIN_LOG_DIR:=/var/log/jellyfin}
|
|
: ${JELLYFIN_DATA_DIR:=/var/lib/jellyfin}
|
|
: ${JELLYFIN_CONFIG_DIR:=/etc/jellyfin}
|
|
|
|
pidfile="/run/${RC_SVCNAME}.pid"
|
|
command="/opt/jellyfin/jellyfin"
|
|
command_args="--logdir ${JELLYFIN_LOG_DIR} --cachedir ${JELLYFIN_CACHE_DIR} --configdir ${JELLYFIN_CONFIG_DIR} --datadir ${JELLYFIN_DATA_DIR}"
|
|
command_user="${RC_SVCNAME}:${RC_SVCNAME}"
|
|
command_background=true
|
|
|
|
start_pre() {
|
|
# Ensure that our dirs are correct
|
|
checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
|
|
${JELLYFIN_LOG_DIR}
|
|
checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
|
|
${JELLYFIN_CACHE_DIR}
|
|
checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
|
|
${JELLYFIN_CONFIG_DIR}
|
|
checkpath --directory --owner jellyfin:jellyfin --mode 0775 \
|
|
${JELLYFIN_DATA_DIR}
|
|
}
|