From d8218ba78579ab122e31e0366eba36cbcf9229cc Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 9 Jan 2021 22:38:13 +0100 Subject: [PATCH 1/5] Finding an available port --- scripts/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install b/scripts/install index 0e3868c..b3532a4 100644 --- a/scripts/install +++ b/scripts/install @@ -81,7 +81,7 @@ ynh_app_setting_set --app=$app --key=overwrite_systemd --value="1" #================================================= # FIND AND OPEN A PORT #================================================= -ynh_script_progression --message="Configuring firewall..." --weight=2 +ynh_script_progression --message="Finding an available port..." --weight=2 # Find a free port port=$(ynh_find_port --port=9001) From 73fbbcb01fb5869348781918f7a2eb6668aea849 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 20 Jan 2021 08:34:06 +0100 Subject: [PATCH 2/5] fix linter warnings --- check_process | 4 +--- manifest.json | 4 ++-- scripts/backup | 2 -- scripts/restore | 2 +- scripts/upgrade | 6 ++++++ 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/check_process b/check_process index f159030..8672ecd 100644 --- a/check_process +++ b/check_process @@ -37,7 +37,7 @@ setup_public=1 upgrade=1 backup_restore=1 - multi_instance=0 + multi_instance=1 port_already_use=1 (9001) change_url=1 actions=1 @@ -85,8 +85,6 @@ useldap=0 ; Checks setup_root=1 -;;; Levels - Level 5=auto ;;; Options Email= Notification=change diff --git a/manifest.json b/manifest.json index 83daae7..8df7210 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Online editor providing collaborative editing in real-time.", "fr": "Éditeur en ligne fournissant l'édition collaborative en temps réel." }, - "version": "1.8.4~ynh1", + "version": "1.8.4~ynh2", "url": "https://framapad.org", "license": "Apache-2.0", "maintainer": { @@ -18,7 +18,7 @@ "email": "maniackc_dev@crudelis.fr" }], "requirements": { - "yunohost": ">= 3.6" + "yunohost": ">= 3.8.1" }, "multi_instance": true, "services": [ diff --git a/scripts/backup b/scripts/backup index 1b563c6..a446a3e 100644 --- a/scripts/backup +++ b/scripts/backup @@ -36,7 +36,6 @@ ynh_print_info --message="Declaring files to be backed up..." # BACKUP THE APP MAIN DIR #================================================= -CHECK_SIZE "$final_path" ynh_backup --src_path="$final_path" #================================================= @@ -51,7 +50,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_print_info --message="Backing up the MySQL database..." ynh_mysql_dump_db --database="$db_name" > db.sql -CHECK_SIZE "db.sql" #================================================= # SPECIFIC BACKUP diff --git a/scripts/restore b/scripts/restore index 1510ced..248d03c 100644 --- a/scripts/restore +++ b/scripts/restore @@ -149,7 +149,7 @@ yunohost service add $app --log "/var/log/$app/etherpad.log" ynh_script_progression --message="Restoring the systemd configuration..." ynh_restore_file --origin_path="/etc/systemd/system/$app.service" -systemctl enable $app.service +systemctl enable $app.service --quiet #================================================= # RESTORE FAIL2BAN CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 79e4cf0..23f0a3b 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -358,6 +358,12 @@ chmod 600 "$final_path/credentials.json" # Restrict access to credentials.json chown $app -R /var/log/$app/etherpad.log +#================================================= +# ADVERTISE SERVICE IN ADMIN PANEL +#================================================= + +yunohost service add $app --log "/var/log/$app/etherpad.log" + #================================================= # UPGRADE FAIL2BAN #================================================= From f5117015c92267313090c35c7422bc42db6af361 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 20 Jan 2021 08:35:19 +0100 Subject: [PATCH 3/5] Update _common.sh --- scripts/_common.sh | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 5d01975..dd120b1 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,28 +4,6 @@ # PERSONAL HELPERS #================================================= -#================================================= -# BACKUP -#================================================= - -HUMAN_SIZE () { # Transforme une taille en Ko en une taille lisible pour un humain - human=$(numfmt --to=iec --from-unit=1K $1) - echo $human -} - -CHECK_SIZE () { # Vérifie avant chaque backup que l'espace est suffisant - file_to_analyse=$1 - backup_size=$(du --summarize "$file_to_analyse" | cut -f1) - free_space=$(df --output=avail "/home/yunohost.backup" | sed 1d) - - if [ $free_space -le $backup_size ] - then - ynh_print_err "Espace insuffisant pour sauvegarder $file_to_analyse." - ynh_print_err "Espace disponible : $(HUMAN_SIZE $free_space)" - ynh_die "Espace nécessaire : $(HUMAN_SIZE $backup_size)" - fi -} - #================================================= # FUTUR OFFICIAL HELPERS #================================================= From 327bd73e136cf808b1d8890f9e77ebcb0dd6da7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 23 Jan 2021 16:54:36 +0100 Subject: [PATCH 4/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eccab34..67a9db7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Etherpad with MyPads plugin for YunoHost [![Integration level](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) -[![Install Etherpad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=etherpad_mypads) +[![Install Etherpad with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad_mypads) *[Lire ce readme en français.](./README_fr.md)* From 8c8f0c9aff78c6a376a581d4323497135b05900a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 23 Jan 2021 16:54:56 +0100 Subject: [PATCH 5/5] Update README_fr.md --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index f8d1c62..ead6f39 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,7 +1,7 @@ # Etherpad avec plugin MyPads pour YunoHost [![Niveau d'intégration](https://dash.yunohost.org/integration/etherpad_mypads.svg)](https://dash.yunohost.org/appci/app/etherpad_mypads) ![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.status.svg) [![](https://ci-apps.yunohost.org/ci/badges/etherpad_mypads.maintain.svg)](https://github.com/YunoHost/Apps/#what-to-do-if-i-cant-maintain-my-app-anymore-) -[![Installer Etherpad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=etherpad_mypads) +[![Installer Etherpad avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=etherpad_mypads) *[Read this readme in english.](./README.md)*