diff --git a/scripts/upgrade b/scripts/upgrade index af4d339..39ebbe5 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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