diff --git a/README.md b/README.md index f0de987..0386f23 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 IRC graphical client -**Shipped version:** 0.7~ynh1 +**Shipped version:** 0.7~ynh2 **Demo:** https://dispatch.khlieng.com/ diff --git a/README_fr.md b/README_fr.md index 7a75220..bcdd382 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 Client graphique IRC -**Version incluse :** 0.7~ynh1 +**Version incluse :** 0.7~ynh2 **Démo :** https://dispatch.khlieng.com/ diff --git a/check_process b/check_process index 2212ec3..8373ca4 100644 --- a/check_process +++ b/check_process @@ -3,9 +3,7 @@ domain="domain.tld" path="/path" admin="john" - language="fr" is_public=1 - password="pass" ; Checks pkg_linter=1 setup_sub_dir=1 @@ -14,7 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 - #upgrade=1 from_commit=CommitHash + upgrade=1 from_commit=bb833bf6d91735f09c9f5f362f38636e86be5337 backup_restore=1 multi_instance=0 change_url=1 @@ -22,6 +20,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. + ; commit=bb833bf6d91735f09c9f5f362f38636e86be5337 + name=Merge pull request #6 from YunoHost-Apps/testing manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& \ No newline at end of file diff --git a/conf/arm64.src b/conf/arm64.src index bb00d6c..ae8806a 100644 --- a/conf/arm64.src +++ b/conf/arm64.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/khlieng/dispatch/releases/download/v0.7/dispatch_0.7_linux_arm64.tar.gz -SOURCE_SUM= +SOURCE_SUM=bf68249f5bbcaafa50f4b72c8401dfe858405705f76985d88d2460737235dca3 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/armv6.src b/conf/armv6.src index ccf2df4..8fb33de 100644 --- a/conf/armv6.src +++ b/conf/armv6.src @@ -1,5 +1,5 @@ SOURCE_URL=https://github.com/khlieng/dispatch/releases/download/v0.7/dispatch_0.7_linux_armv6.tar.gz -SOURCE_SUM= +SOURCE_SUM=dad01b72d80857830175cd7c2f9c5a82f4e59a72edea558ed7869de6bded8d80 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=tar.gz SOURCE_IN_SUBDIR=false diff --git a/conf/nginx.conf b/conf/nginx.conf index 7b4d98f..46c5a05 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,4 +12,6 @@ location / { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $host; + # Include SSOWAT user panel. + include conf.d/yunohost_panel.conf.inc; } diff --git a/manifest.json b/manifest.json index fbbda34..bc570c5 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Web-based IRC graphical client", "fr": "Client graphique IRC" }, - "version": "0.7~ynh1", + "version": "0.7~ynh2", "url": "https://github.com/khlieng/dispatch", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/backup b/scripts/backup index 11f1bbb..d104a02 100644 --- a/scripts/backup +++ b/scripts/backup @@ -13,9 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -46,6 +43,12 @@ ynh_backup --src_path="$final_path" ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +#================================================= +# BACKUP LOGROTATE +#================================================= + +ynh_backup --src_path="/etc/logrotate.d/$app" + #================================================= # BACKUP SYSTEMD #================================================= diff --git a/scripts/change_url b/scripts/change_url index 55a4919..6820df2 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -109,7 +109,7 @@ fi ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Listening on port" +ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Listening on port" #================================================= # RELOAD NGINX diff --git a/scripts/install b/scripts/install index 800e1ab..1e180ea 100644 --- a/scripts/install +++ b/scripts/install @@ -13,9 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -100,6 +97,14 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1 ynh_add_systemd_config +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Configuring log rotation..." --weight=1 + +# Use logrotate to manage application logfile(s) +ynh_use_logrotate + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/remove b/scripts/remove index 74f07d2..983d8ba 100644 --- a/scripts/remove +++ b/scripts/remove @@ -41,6 +41,14 @@ ynh_script_progression --message="Stopping and removing the systemd service..." # Remove the dedicated systemd config ynh_remove_systemd_config +#================================================= +# REMOVE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Removing logrotate configuration..." --weight=1 + +# Remove the app-specific logrotate config +ynh_remove_logrotate + #================================================= # REMOVE APP MAIN DIR #================================================= diff --git a/scripts/restore b/scripts/restore index d875358..06d3f63 100644 --- a/scripts/restore +++ b/scripts/restore @@ -76,6 +76,13 @@ ynh_script_progression --message="Restoring the systemd configuration..." --weig ynh_restore_file --origin_path="/etc/systemd/system/$app.service" systemctl enable $app.service --quiet +#================================================= +# RESTORE THE LOGROTATE CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1 + +ynh_restore_file --origin_path="/etc/logrotate.d/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f943ce1..8065b9d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -104,6 +104,14 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=2 # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# SETUP LOGROTATE +#================================================= +ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1 + +# Use logrotate to manage app-specific logfile(s) +ynh_use_logrotate --non-append + #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================