mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Fix linter warning : no need to use $is_public
This commit is contained in:
parent
3633fb022e
commit
fc22726fa6
2 changed files with 10 additions and 5 deletions
|
@ -48,7 +48,6 @@ ynh_script_progression --message="Storing installation settings..."
|
||||||
|
|
||||||
ynh_app_setting_set --app="$app" --key=domain --value="$domain"
|
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=path --value="$path_url"
|
||||||
ynh_app_setting_set --app="$app" --key=is_public --value="$is_public"
|
|
||||||
ynh_app_setting_set --app="$app" --key=admin --value="$admin"
|
ynh_app_setting_set --app="$app" --key=admin --value="$admin"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -68,7 +67,7 @@ ynh_app_setting_set --app="$app" --key=port --value="$port"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..."
|
ynh_script_progression --message="Installing dependencies..."
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A POSTGRESQL DATABASE
|
# CREATE A POSTGRESQL DATABASE
|
||||||
|
@ -236,14 +235,14 @@ ynh_add_fail2ban_config --logpath="/var/log/nginx/$domain-access.log" --failrege
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SSOWAT
|
# SETUP SSOWAT
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring SSOwat..."
|
ynh_script_progression --message="Configuring permissions..."
|
||||||
|
|
||||||
# Make app public if necessary or protect it
|
# Make app public if necessary or protect it
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
# Everyone can access the app.
|
# Everyone can access the app.
|
||||||
# The "main" permission is automatically created before the install script.
|
# 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
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
domain=$(ynh_app_setting_get --app="$app" --key=domain)
|
domain=$(ynh_app_setting_get --app="$app" --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app="$app" --key=path)
|
path_url=$(ynh_app_setting_get --app="$app" --key=path)
|
||||||
is_public=$(ynh_app_setting_get --app="$app" --key=is_public)
|
|
||||||
final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
final_path=$(ynh_app_setting_get --app="$app" --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app="$app" --key=db_name)
|
db_name=$(ynh_app_setting_get --app="$app" --key=db_name)
|
||||||
db_user="$db_name"
|
db_user="$db_name"
|
||||||
|
@ -52,6 +51,13 @@ if [ ! -d "$final_path/code/" ]; then
|
||||||
ynh_app_setting_set --app="$app" --key=code_migration --value=1
|
ynh_app_setting_set --app="$app" --key=code_migration --value=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Cleaning legacy permissions
|
||||||
|
if ynh_legacy_permissions_exists; then
|
||||||
|
ynh_legacy_permissions_delete_all
|
||||||
|
|
||||||
|
ynh_app_setting_delete --app=$app --key=is_public
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue