1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jellyfin_ynh.git synced 2024-09-03 19:26:29 +02:00

Add system user to render group only if it exists

This commit is contained in:
tituspijean 2021-05-07 18:59:49 +02:00
parent 69a4af8b68
commit ce8050b5b7

View file

@ -47,8 +47,8 @@ if [ -z "$config_path" ]; then
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# If jellyfin doesn't belong to render group, add it
if [ ! $(id -Gn $app | grep -q '\brender\b') ]; then
# If render group exists, and system user doesn't belong to it, add it
if [ $(grep -q "^render:" /etc/group) ] && [ ! $(id -Gn $app | grep -q '\brender\b') ]; then
adduser $app render
fi