mirror of
https://github.com/YunoHost-Apps/jellyfin_ynh.git
synced 2024-09-03 19:26:29 +02:00
Add jellyfin to render group (#57)
* Add jellyfin to render group * Update install * Fix * Improve render group detection Co-authored-by: tituspijean <tituspijean@outlook.com>
This commit is contained in:
parent
f5075d9c97
commit
0e4f536ad5
2 changed files with 13 additions and 0 deletions
|
@ -109,6 +109,11 @@ ynh_script_progression --message="Configuring system user..." --weight=2
|
|||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
if [ $(grep -q "^render:" /etc/group) ]; then
|
||||
# Add user to render group
|
||||
adduser $app render
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
|
|
|
@ -47,6 +47,11 @@ 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
|
||||
adduser $app render
|
||||
fi
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
@ -58,7 +63,10 @@ if ! ynh_permission_exists --permission="admin"; then
|
|||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --allowed=$admin
|
||||
fi
|
||||
<<<<<<< HEAD
|
||||
|
||||
=======
|
||||
>>>>>>> Add jellyfin to render group
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue