diff --git a/scripts/remove b/scripts/remove index 893b568..bcfbfc6 100644 --- a/scripts/remove +++ b/scripts/remove @@ -50,7 +50,6 @@ ynh_script_progression --message="Removing logrotate configuration..." # Remove the app-specific logrotate config ynh_remove_logrotate - #================================================= # REMOVE FAIL2BAN CONFIGURATION #================================================= diff --git a/scripts/restore b/scripts/restore index ae8521b..5bbee27 100644 --- a/scripts/restore +++ b/scripts/restore @@ -15,7 +15,6 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - #### Remove this function if there's nothing to clean before calling the remove script. true } # Exit if an error occurs during the execution of the script @@ -28,8 +27,8 @@ ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) diff --git a/scripts/upgrade b/scripts/upgrade index e579599..626454a 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,9 +16,9 @@ ynh_script_progression --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) +domain=$(ynh_app_setting_get --app=$app --key=domain) +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) #================================================= @@ -38,9 +38,6 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi -# Cleaning legacy permissions -is_public=$(ynh_app_setting_get --app=$app --key=is_public) - if [ -n "$is_public" ]; then # Delete is_public key. It is now handled by the permissions system ynh_app_setting_delete --app=$app --key=is_public @@ -90,7 +87,6 @@ then # Remove the tmp directory securely ynh_secure_remove --file="$tmpdir" - fi #================================================= @@ -146,7 +142,7 @@ chmod -R g+rwX $final_path/{cache/,data/,pagecache/,tmp/} #================================================= ynh_script_progression --message="Reconfiguring Fail2Ban..." -# Create a dedicated fail2ban config +# Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="$final_path/data/log.txt" --failregex="\s-\s\s-\sLogin failed for user.*$" #=================================================