1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mailman3_ynh.git synced 2024-09-03 19:36:17 +02:00

Apply example_ynh

This commit is contained in:
yalh76 2022-08-08 18:26:48 +02:00
parent 7614552436
commit d570b6e8b1
5 changed files with 29 additions and 28 deletions

View file

@ -2,6 +2,8 @@
; Manifest ; Manifest
domain="domain.tld" domain="domain.tld"
is_public=1 is_public=1
admin="john"
password="1Strong-Password"
; Checks ; Checks
pkg_linter=1 pkg_linter=1
setup_sub_dir=0 setup_sub_dir=0
@ -10,6 +12,8 @@
setup_private=1 setup_private=1
setup_public=1 setup_public=1
upgrade=1 upgrade=1
# 1.0~ynh1
upgrade=1 from_commit=95abca09590e1dd9bcd34a0fdb6d32e6c14d9306
backup_restore=1 backup_restore=1
multi_instance=0 multi_instance=0
port_already_use=1 port_already_use=1
@ -17,6 +21,3 @@
;;; Options ;;; Options
Email= Email=
Notification=none Notification=none
;;; Upgrade options
; commit=CommitHash
name=Name and date of the commit.

View file

@ -6,7 +6,7 @@
"en": "Electronic mailing lists manager", "en": "Electronic mailing lists manager",
"fr": "Un gestionnaire de liste de discussion par email" "fr": "Un gestionnaire de liste de discussion par email"
}, },
"version": "1.0~ynh2", "version": "1.0~ynh3",
"url": "http://www.list.org/", "url": "http://www.list.org/",
"upstream": { "upstream": {
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
@ -30,7 +30,7 @@
"nginx" "nginx"
], ],
"arguments": { "arguments": {
"install" : [ "install": [
{ {
"name": "domain", "name": "domain",
"type": "domain" "type": "domain"

View file

@ -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_app --db_name=$db_name_app
ynh_psql_remove_db --db_user=$db_user_web --db_name=$db_name_web 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 # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
@ -79,6 +71,14 @@ ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_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 # SPECIFIC REMOVE
#================================================= #=================================================

View file

@ -44,13 +44,6 @@ test ! -d /usr/share/mailman3-web \
#================================================= #=================================================
# STANDARD RESTORATION STEPS # 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 # SPECIFIC RESTORATION
#================================================= #=================================================
@ -61,6 +54,13 @@ ynh_script_progression --message="Reinstalling dependencies..."
# Define and install dependencies # Define and install dependencies
ynh_exec_warn_less ynh_install_app_dependencies $pkg_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 # RESTORE THE POSTGRESQL DATABASE
#================================================= #=================================================

View file

@ -65,6 +65,13 @@ if ynh_legacy_permissions_exists; then
ynh_app_setting_delete --app=$app --key=is_public ynh_app_setting_delete --app=$app --key=is_public
fi fi
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..."
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION
#================================================= #=================================================
@ -73,13 +80,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_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 # POSTFIX CONFIGURATION
#================================================= #=================================================