From ec90c07d5e505e334a6c7bbc20c6bfbf8e770c69 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 6 Nov 2021 11:06:49 +0100 Subject: [PATCH] Cleaning up --- check_process | 8 ++++++-- scripts/upgrade | 21 +++++++-------------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/check_process b/check_process index 1f698ae..aa00f58 100755 --- a/check_process +++ b/check_process @@ -11,10 +11,14 @@ setup_private=0 setup_public=1 upgrade=1 - #upgrade=1 from_commit= + upgrade=1 from_commit=81e4171acaa44520d0f527e6af445f4f33f2bca0 backup_restore=1 multi_instance=1 change_url=0 ;;; Options Email= -Notification= \ No newline at end of file +Notification=none +;;; Upgrade options + ; commit=81e4171acaa44520d0f527e6af445f4f33f2bca0 + name=Merge pull request #9 + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& diff --git a/scripts/upgrade b/scripts/upgrade index 83d0293..5144837 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,16 +40,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# Migrate legacy permissions to new system -#================================================= -if ynh_legacy_permissions_exists -then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi - #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -69,6 +59,13 @@ if [ -z "$db_name" ]; then ynh_app_setting_set --app=$app --key=db_name --value=$db_name fi +if ynh_legacy_permissions_exists +then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # CREATE DEDICATED USER #================================================= @@ -210,10 +207,6 @@ chmod 644 "/etc/cron.d/$app" ynh_script_progression --message="Upgrading dependencies..." if [ $database -eq 1 ]; then - #================================================= - # CHECK VERSION FOR SPECIFIC MYSQL UPDATE - #================================================= - # Check version and if this version was a fresh install push mysql query db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)