diff --git a/check_process b/check_process index 9a38718..6bdf175 100644 --- a/check_process +++ b/check_process @@ -2,6 +2,8 @@ ; Manifest domain="domain.tld" is_public=1 + admin="john" + password="1Strong-Password" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -10,6 +12,8 @@ setup_private=1 setup_public=1 upgrade=1 + # 1.0~ynh1 + upgrade=1 from_commit=95abca09590e1dd9bcd34a0fdb6d32e6c14d9306 backup_restore=1 multi_instance=0 port_already_use=1 @@ -17,6 +21,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. diff --git a/manifest.json b/manifest.json index 72ca265..f082c57 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Electronic mailing lists manager", "fr": "Un gestionnaire de liste de discussion par email" }, - "version": "1.0~ynh2", + "version": "1.0~ynh3", "url": "http://www.list.org/", "upstream": { "license": "AGPL-3.0-or-later", @@ -30,7 +30,7 @@ "nginx" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", "type": "domain" diff --git a/scripts/remove b/scripts/remove index 50c6050..9efc7df 100755 --- a/scripts/remove +++ b/scripts/remove @@ -63,14 +63,6 @@ ynh_script_progression --message="Removing the PostgreSQL database..." ynh_psql_remove_db --db_user=$db_user_app --db_name=$db_name_app ynh_psql_remove_db --db_user=$db_user_web --db_name=$db_name_web -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -79,6 +71,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..." # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= diff --git a/scripts/restore b/scripts/restore index 368276c..d16a70c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -40,17 +40,10 @@ db_user_web=$db_name_web ynh_script_progression --message="Validating restoration parameters..." test ! -d /usr/share/mailman3-web \ - || ynh_die --message="There is already an installation present at /usr/share/mailman3-web?" + || ynh_die --message="There is already an installation present at /usr/share/mailman3-web?" #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # SPECIFIC RESTORATION #================================================= @@ -61,6 +54,13 @@ ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5a40761..c47caa6 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,6 +65,13 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -73,13 +80,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." - -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - #================================================= # POSTFIX CONFIGURATION #=================================================