From 0dc1860808f97215a96a93263b298f8d7c3831f6 Mon Sep 17 00:00:00 2001 From: yalh76 Date: Thu, 26 Aug 2021 00:10:02 +0200 Subject: [PATCH] Trying to fix bullseye --- README.md | 2 +- README_fr.md | 2 +- check_process | 9 +++++++-- manifest.json | 4 ++-- scripts/change_url | 4 ++-- scripts/install | 4 ++-- scripts/remove | 6 ++++-- scripts/restore | 10 +++++++++- scripts/upgrade | 15 ++++++++++++--- 9 files changed, 40 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index faa1b91..d3465d3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Web-based interface for system administration for Unix. -**Shipped version:** 1.979~ynh1 +**Shipped version:** 1.979~ynh2 diff --git a/README_fr.md b/README_fr.md index 1269fc1..381f42c 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Interface Web d'administration système pour Unix. -**Version incluse :** 1.979~ynh1 +**Version incluse :** 1.979~ynh2 diff --git a/check_process b/check_process index 8002a78..12230c0 100644 --- a/check_process +++ b/check_process @@ -1,7 +1,7 @@ ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) + domain="domain.tld" + admin="john" ; Checks pkg_linter=1 setup_sub_dir=0 @@ -10,6 +10,8 @@ setup_private=0 setup_public=0 upgrade=1 + # 1.979~ynh1 + upgrade=1 from_commit=157310ca395c326add85d24fa397f7fd0cadefb1 backup_restore=1 multi_instance=0 port_already_use=0 @@ -17,3 +19,6 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit=157310ca395c326add85d24fa397f7fd0cadefb1 + name=1.979~ynh1. diff --git a/manifest.json b/manifest.json index c0d0d89..94dfc80 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web-based interface for system administration for Unix.", "fr": "Interface Web d'administration système pour Unix." }, - "version": "1.979~ynh1", + "version": "1.979~ynh2", "url": "http://www.webmin.com", "upstream": { "license": "BSD-3-Clause", @@ -18,7 +18,7 @@ "name": "Anmol Sharma", "email": "anmol@datamol.org" }, - "requirements": { + "requirements": { "yunohost": ">= 4.1.7" }, "multi_instance": false, diff --git a/scripts/change_url b/scripts/change_url index 37b9a9c..24ffe59 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -62,7 +62,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF @@ -99,7 +99,7 @@ fi ynh_script_progression --message="Starting a systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" --log_path="systemd" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index ae85a17..3227e70 100644 --- a/scripts/install +++ b/scripts/install @@ -98,7 +98,7 @@ ynh_script_progression --message="Configuring a systemd service..." # Create a dedicated systemd config systemctl daemon-reload -systemctl enable $app --quiet +systemctl enable $app.service --quiet #================================================= # GENERIC FINALIZATION @@ -115,7 +115,7 @@ yunohost service add $app --description="Webmin Daemon" ynh_script_progression --message="Starting a systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" --log_path="systemd" #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index ed3fe33..bc5f213 100644 --- a/scripts/remove +++ b/scripts/remove @@ -38,7 +38,9 @@ fi ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config -ynh_remove_systemd_config +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" +systemctl disable $app.service --quiet +systemctl daemon-reload #================================================= # REMOVE DEPENDENCIES @@ -46,7 +48,7 @@ ynh_remove_systemd_config ynh_script_progression --message="Removing dependencies..." # Remove metapackage and its dependencies -ynh_remove_app_dependencies +ynh_exec_warn_less ynh_remove_app_dependencies #================================================= # REMOVE NGINX CONFIGURATION diff --git a/scripts/restore b/scripts/restore index 1ed01aa..e4a7bb6 100755 --- a/scripts/restore +++ b/scripts/restore @@ -67,6 +67,14 @@ ynh_script_progression --message="Restoring various files..." ynh_restore_file --origin_path="/etc/webmin/miniserv.conf" +#================================================= +# RESTORE SYSTEMD +#================================================= +ynh_script_progression --message="Restoring the systemd configuration..." + +systemctl daemon-reload +systemctl enable $app.service --quiet + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= @@ -79,7 +87,7 @@ yunohost service add $app --description="Webmin Daemon" #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 5826b67..2e87fdb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -49,7 +49,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Stopped LSB" --log_path="systemd" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -81,7 +81,7 @@ ynh_backup_if_checksum_is_different --file="/etc/webmin/miniserv.conf" ynh_install_extra_app_dependencies --repo="deb https://download.webmin.com/download/repository sarge contrib" --package="webmin" --key="https://download.webmin.com/jcameron-key.asc" #================================================= -# INSTALL WEBMIN +# SPECIFIC UPGRADE #================================================= # UPDATE A CONFIG FILE #================================================= @@ -93,6 +93,15 @@ ynh_replace_string --match_string="listen=10000" --replace_string="listen=$port" # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum --file="/etc/webmin/miniserv.conf" +#================================================= +# SETUP SYSTEMD +#================================================= +ynh_script_progression --message="Upgrading systemd configuration..." + +# Create a dedicated systemd config +systemctl daemon-reload +systemctl enable $app.service --quiet + #================================================= # GENERIC FINALIZATION #================================================= @@ -107,7 +116,7 @@ yunohost service add $app --description="Webmin Daemon" #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" +ynh_systemd_action --service_name=$app --action="start" --line_match="Started LSB" --log_path="systemd" #================================================= # RELOAD NGINX