Co-authored-by: Shadowghost <Shadowghost@users.noreply.github.com> fix (#9006) to 10.8.z
This commit is contained in:
parent
173a963dbf
commit
0c7ceb1545
10
debian/postinst
vendored
10
debian/postinst
vendored
|
@ -10,6 +10,8 @@ if [[ -f $DEFAULT_FILE ]]; then
|
|||
fi
|
||||
|
||||
JELLYFIN_USER=${JELLYFIN_USER:-jellyfin}
|
||||
RENDER_GROUP=${RENDER_GROUP:-render}
|
||||
VIDEO_GROUP=${VIDEO_GROUP:-video}
|
||||
|
||||
# Data directories for program data (cache, db), configs, and logs
|
||||
PROGRAMDATA=${JELLYFIN_DATA_DIRECTORY-/var/lib/$NAME}
|
||||
|
@ -28,6 +30,14 @@ case "$1" in
|
|||
adduser --system --ingroup ${JELLYFIN_USER} --shell /bin/false ${JELLYFIN_USER} --no-create-home --home ${PROGRAMDATA} \
|
||||
--gecos "Jellyfin default user" > /dev/null 2>&1
|
||||
fi
|
||||
# Add jellyfin to the render group for hwa
|
||||
if [[ ! -z "$(getent group ${RENDER_GROUP})" ]]; then
|
||||
usermod -aG ${RENDER_GROUP} ${JELLYFIN_USER} > /dev/null 2>&1
|
||||
fi
|
||||
# Add jellyfin to the video group for hwa
|
||||
if [[ ! -z "$(getent group ${VIDEO_GROUP})" ]]; then
|
||||
usermod -aG ${VIDEO_GROUP} ${JELLYFIN_USER} > /dev/null 2>&1
|
||||
fi
|
||||
# ensure $PROGRAMDATA exists
|
||||
if [[ ! -d $PROGRAMDATA ]]; then
|
||||
mkdir $PROGRAMDATA
|
||||
|
|
|
@ -139,6 +139,9 @@ getent group jellyfin >/dev/null || groupadd -r jellyfin
|
|||
getent passwd jellyfin >/dev/null || \
|
||||
useradd -r -g jellyfin -d %{_sharedstatedir}/jellyfin -s /sbin/nologin \
|
||||
-c "Jellyfin default user" jellyfin
|
||||
# Add jellyfin to the render and video groups for hwa.
|
||||
[ ! -z "$(getent group render)" ] && usermod -aG render jellyfin >/dev/null 2>&1
|
||||
[ ! -z "$(getent group video)" ] && usermod -aG video jellyfin >/dev/null 2>&1
|
||||
exit 0
|
||||
|
||||
%post server
|
||||
|
|
Loading…
Reference in New Issue
Block a user