diff --git a/manifest.json b/manifest.json index 6ca8f8c..79e9520 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "thelounge", "packaging_format": 1, "description": { - "en": "The Lounge is a web IRC client.", - "fr": "The Lounge est un client web IRC." + "en": "Self-hosted web IRC client.", + "fr": "Client Web IRC auto-hébergé." }, "version": "4.1.0~ynh2", "url": "https://thelounge.chat/", diff --git a/scripts/change_url b/scripts/change_url index f08dfe8..d92c78a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -91,7 +91,7 @@ fi #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 1c3be44..e0a210e 100644 --- a/scripts/install +++ b/scripts/install @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script @@ -168,7 +168,7 @@ ynh_use_logrotate ynh_script_progression --message="Starting a systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http" #================================================= # SETUP SSOWAT diff --git a/scripts/restore b/scripts/restore index 4ed05d9..96123f8 100644 --- a/scripts/restore +++ b/scripts/restore @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - true + ynh_clean_check_starting } # Exit if an error occurs during the execution of the script @@ -65,6 +65,14 @@ ynh_script_progression --message="Recreating the dedicated system user..." # Create the dedicated user (if not existing) ynh_system_user_create --username=$app +#================================================= +# RESTORE USER RIGHTS +#================================================= + +# Restore permissions to app files +chown -R $app: $final_path +chown -R $app: $config_path + #================================================= # SPECIFIC RESTORATION #================================================= @@ -105,7 +113,7 @@ yunohost service add $app --log "/var/log/$app/$app.log" #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http" #================================================= # RESTORE THE LOGROTATE CONFIGURATION @@ -113,14 +121,6 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$ap ynh_restore_file --origin_path="/etc/logrotate.d/$app" -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions to app files -chown -R $app: $final_path -chown -R $app: $config_path - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 2da7551..abaf462 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -63,6 +63,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take # Backup the current version of the app ynh_backup_before_upgrade ynh_clean_setup () { + ynh_clean_check_starting # restore it if the upgrade fails ynh_restore_upgradebackup } @@ -198,7 +199,7 @@ chown -R $app: $config_path #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http" #================================================= # RELOAD NGINX