From 839b8f95ed6f6bc83270d831f2bdc8b5869c856d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:52:40 +0100 Subject: [PATCH 01/11] fix logs --- scripts/install | 2 +- scripts/upgrade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index b1a5933..68ce7a2 100755 --- a/scripts/install +++ b/scripts/install @@ -56,7 +56,7 @@ yunohost service add $app --description="Realtime kanban board for workgroups" - ynh_use_logrotate -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" +ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" #================================================= # APP INITIAL CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index c0c84fa..37127f0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -53,7 +53,7 @@ yunohost service add $app --description="Realtime kanban board for workgroups" - ynh_use_logrotate --non-append -ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" +ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) From f187570dfb787096285706a92cbdb1d8c4afb30f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:09:56 +0100 Subject: [PATCH 02/11] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 851f1b0..73ff474 100644 --- a/manifest.toml +++ b/manifest.toml @@ -7,7 +7,7 @@ name = "Planka" description.en = "Realtime kanban board for workgroups" description.fr = "Tableau Kanban en temps réel pour les groupes de travail" -version = "1.15.2~ynh1" +version = "1.15.2~ynh2" maintainers = ["eric_G"] From b1d4fb6a21b12a1bdd8124496fd87a7a7df53b09 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Dec 2023 13:10:00 +0000 Subject: [PATCH 03/11] Auto-update README --- README.md | 2 +- README_fr.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a8043dd..0b5b647 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Elegant open source project tracking. - Internationalization -**Shipped version:** 1.15.2~ynh1 +**Shipped version:** 1.15.2~ynh2 **Demo:** https://plankanban.github.io/planka/#/ diff --git a/README_fr.md b/README_fr.md index 95c1bac..68e862b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -30,7 +30,7 @@ Suivi de projet open source élégant. - InternationalisationCeci est une fausse description des fonctionalités de l'app -**Version incluse :** 1.15.2~ynh1 +**Version incluse :** 1.15.2~ynh2 **Démo :** https://plankanban.github.io/planka/#/ From ef19365bba219a8028864d9e02b8630b6e864a71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:24:23 +0100 Subject: [PATCH 04/11] cleaning --- scripts/backup | 8 -------- scripts/change_url | 2 ++ scripts/install | 2 ++ scripts/remove | 2 -- scripts/restore | 2 -- scripts/upgrade | 17 +++++++++++++---- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/scripts/backup b/scripts/backup index d8e379f..6685ada 100755 --- a/scripts/backup +++ b/scripts/backup @@ -33,14 +33,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf" ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP LOGROTATE -#================================================= - -ynh_backup --src_path="/etc/logrotate.d/$app" - #================================================= # BACKUP SYSTEMD #================================================= diff --git a/scripts/change_url b/scripts/change_url index 3a9b28d..6e9ee93 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,6 +25,8 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config +ynh_replace_string --match_string="BASE_URL=https://$old_domain" --replace_string="BASE_URL=https://$new_domain" --target_file="$install_dir/.env" + #================================================= # GENERIC FINALISATION #================================================= diff --git a/scripts/install b/scripts/install index 68ce7a2..a3386b9 100755 --- a/scripts/install +++ b/scripts/install @@ -81,6 +81,8 @@ pushd $install_dir ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run db:init popd +ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" + #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/remove b/scripts/remove index d51ce1c..e5ffc34 100755 --- a/scripts/remove +++ b/scripts/remove @@ -28,8 +28,6 @@ ynh_remove_nginx_config ynh_remove_nodejs -ynh_remove_logrotate - ynh_remove_fail2ban_config #================================================= diff --git a/scripts/restore b/scripts/restore index a031d7a..f5a5d51 100755 --- a/scripts/restore +++ b/scripts/restore @@ -48,8 +48,6 @@ systemctl enable $app.service --quiet yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" -ynh_restore_file --origin_path="/etc/logrotate.d/$app" - ynh_restore_file --origin_path="/etc/fail2ban/jail.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" ynh_systemd_action --action=restart --service_name=fail2ban diff --git a/scripts/upgrade b/scripts/upgrade index 37127f0..27d8e1f 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -51,10 +51,6 @@ ynh_add_systemd_config yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" -ynh_use_logrotate --non-append - -ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" - #================================================= # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) #================================================= @@ -67,6 +63,19 @@ ynh_add_config --template=".env" --destination="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +#================================================= +# INSTALL PLANKA +#================================================= +ynh_script_progression --message="Installing $app..." --weight=10 + +pushd $install_dir + ynh_use_nodejs + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm install + ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run db:init +popd + +ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" + #================================================= # START SYSTEMD SERVICE #================================================= From 1c9f9c135164ff257506edbe2af819590052901e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:28:56 +0100 Subject: [PATCH 05/11] Update install --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index a3386b9..f17e86c 100755 --- a/scripts/install +++ b/scripts/install @@ -56,8 +56,6 @@ yunohost service add $app --description="Realtime kanban board for workgroups" - ynh_use_logrotate -ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" - #================================================= # APP INITIAL CONFIGURATION #================================================= From cab143506b9159375a2f4604b8aa2ef446973a77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:31:31 +0100 Subject: [PATCH 06/11] Update DESCRIPTION_fr.md --- doc/DESCRIPTION_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/DESCRIPTION_fr.md b/doc/DESCRIPTION_fr.md index e3049c5..e1149c0 100644 --- a/doc/DESCRIPTION_fr.md +++ b/doc/DESCRIPTION_fr.md @@ -9,4 +9,4 @@ Suivi de projet open source élégant. - Personnaliser l'arrière-plan du projet - Mises à jour en temps réel - Notifications utilisateur -- InternationalisationCeci est une fausse description des fonctionalités de l'app +- Internationalisation From 77ac5b48b5df7f2f1e1644cdd970eb76bb0c7121 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Fri, 15 Dec 2023 13:31:36 +0000 Subject: [PATCH 07/11] Auto-update README --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index 68e862b..fac1bd4 100644 --- a/README_fr.md +++ b/README_fr.md @@ -27,7 +27,7 @@ Suivi de projet open source élégant. - Personnaliser l'arrière-plan du projet - Mises à jour en temps réel - Notifications utilisateur -- InternationalisationCeci est une fausse description des fonctionalités de l'app +- Internationalisation **Version incluse :** 1.15.2~ynh2 From d0cce2050a6b01c3409adc70d093c0a67d51cb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:32:22 +0100 Subject: [PATCH 08/11] Update change_url --- scripts/change_url | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/change_url b/scripts/change_url index 6e9ee93..45adf17 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -25,6 +25,10 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config +#================================================= +# SPECIFIC MODIFICATIONS +#================================================= + ynh_replace_string --match_string="BASE_URL=https://$old_domain" --replace_string="BASE_URL=https://$new_domain" --target_file="$install_dir/.env" #================================================= From cb8a99513cc22b755e030d01fcfa9d31262279a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:45:54 +0100 Subject: [PATCH 09/11] Update install --- scripts/install | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index f17e86c..8dd41b6 100755 --- a/scripts/install +++ b/scripts/install @@ -79,8 +79,6 @@ pushd $install_dir ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run db:init popd -ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" - #================================================= # GENERIC FINALIZATION #================================================= @@ -90,6 +88,12 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +#================================================= +# ADD FAIL2BAN +#================================================= + +ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" + #================================================= # END OF SCRIPT #================================================= From 5a5c6c5b366133d57da110d6f14935a2ca41f77b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 14:46:13 +0100 Subject: [PATCH 10/11] Update install --- scripts/install | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index 8dd41b6..941eecb 100755 --- a/scripts/install +++ b/scripts/install @@ -54,8 +54,6 @@ ynh_add_systemd_config yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" -ynh_use_logrotate - #================================================= # APP INITIAL CONFIGURATION #================================================= From bb2262b64cbd1dad2010483347b77915896d0b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 15 Dec 2023 15:08:46 +0100 Subject: [PATCH 11/11] Update upgrade --- scripts/upgrade | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index 27d8e1f..8291e82 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -74,8 +74,6 @@ pushd $install_dir ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run db:init popd -ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" - #================================================= # START SYSTEMD SERVICE #================================================= @@ -83,6 +81,12 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1 ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" +#================================================= +# ADD FAIL2BAN +#================================================= + +ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: \)$" + #================================================= # END OF SCRIPT #=================================================