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

Fix linter warnings

This commit is contained in:
ericgaspar 2021-03-11 08:34:12 +01:00
parent 297b82a668
commit de07007051
No known key found for this signature in database
GPG key ID: 574F281483054D44
2 changed files with 20 additions and 15 deletions

View file

@ -51,7 +51,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
# STANDARD MODIFICATIONS
@ -160,11 +159,11 @@ if [ $is_public -eq 1 ]
then
# Everyone can access the app.
# The "main" permission is automatically created before the install script.
ynh_permission_update --permission "main" --add "visitors"
ynh_permission_update --permission="main" --add="visitors"
fi
# Only the admin can access the admin panel of the app (if the app has an admin panel)
ynh_permission_create --permission "admin" --allowed $admin
ynh_permission_create --permission="admin" --allowed=$admin
#=================================================
# RELOAD NGINX

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
admin=$(ynh_app_setting_get --app=$app --key=admin)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
@ -28,6 +27,23 @@ port=$(ynh_app_setting_get --app=$app --key=port)
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
# Cleaning legacy permissions
if ynh_legacy_permissions_exists; then
ynh_legacy_permissions_delete_all
ynh_app_setting_delete --app=$app --key=is_public
fi
if ! ynh_permission_exists --permission="admin"; then
# Create the required permissions
ynh_permission_create --permission="admin" --allowed=$admin
fi
#=================================================
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#=================================================
@ -83,7 +99,7 @@ if [ -z "/etc/jellyfin/network.xml" ]; then
ynh_script_progression --message="Configuring the settings..." --weight=1
# Load services once to generate network.xml
systemctl enable jellyfin
systemctl enable jellyfin --quiet
systemctl start jellyfin
sleep 5
systemctl stop jellyfin
@ -127,16 +143,6 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Upgrading permissions configuration..." --weight=1
# Create the admin permission if needed
if ! ynh_permission_exists --permission "admin"; then
ynh_permission_create --permission "admin" --allowed $admin
fi
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================