1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/planka_ynh.git synced 2024-09-03 20:06:00 +02:00

Merge pull request #3 from YunoHost-Apps/testing

fix logs
This commit is contained in:
eric_G 2023-12-15 15:09:08 +01:00 committed by GitHub
commit 06efb533f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 34 additions and 25 deletions

View file

@ -30,7 +30,7 @@ Elegant open source project tracking.
- Internationalization - Internationalization
**Shipped version:** 1.15.2~ynh1 **Shipped version:** 1.15.2~ynh2
**Demo:** https://plankanban.github.io/planka/#/ **Demo:** https://plankanban.github.io/planka/#/

View file

@ -27,10 +27,10 @@ Suivi de projet open source élégant.
- Personnaliser l'arrière-plan du projet - Personnaliser l'arrière-plan du projet
- Mises à jour en temps réel - Mises à jour en temps réel
- Notifications utilisateur - Notifications utilisateur
- InternationalisationCeci est une fausse description des fonctionalités de l'app - Internationalisation
**Version incluse :** 1.15.2~ynh1 **Version incluse :** 1.15.2~ynh2
**Démo :** https://plankanban.github.io/planka/#/ **Démo :** https://plankanban.github.io/planka/#/

View file

@ -9,4 +9,4 @@ Suivi de projet open source élégant.
- Personnaliser l'arrière-plan du projet - Personnaliser l'arrière-plan du projet
- Mises à jour en temps réel - Mises à jour en temps réel
- Notifications utilisateur - Notifications utilisateur
- InternationalisationCeci est une fausse description des fonctionalités de l'app - Internationalisation

View file

@ -7,7 +7,7 @@ name = "Planka"
description.en = "Realtime kanban board for workgroups" description.en = "Realtime kanban board for workgroups"
description.fr = "Tableau Kanban en temps réel pour les groupes de travail" 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"] maintainers = ["eric_G"]

View file

@ -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/jail.d/$app.conf"
ynh_backup --src_path="/etc/fail2ban/filter.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 # BACKUP SYSTEMD
#================================================= #=================================================

View file

@ -25,6 +25,12 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
ynh_change_url_nginx_config 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"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION
#================================================= #=================================================

View file

@ -54,10 +54,6 @@ ynh_add_systemd_config
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log"
ynh_use_logrotate
ynh_add_fail2ban_config --logpath="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
#================================================= #=================================================
# APP INITIAL CONFIGURATION # APP INITIAL CONFIGURATION
#================================================= #=================================================
@ -90,6 +86,12 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" 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: <ADDR>\)$"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -28,8 +28,6 @@ ynh_remove_nginx_config
ynh_remove_nodejs ynh_remove_nodejs
ynh_remove_logrotate
ynh_remove_fail2ban_config ynh_remove_fail2ban_config
#================================================= #=================================================

View file

@ -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" 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/jail.d/$app.conf"
ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf" ynh_restore_file --origin_path="/etc/fail2ban/filter.d/$app.conf"
ynh_systemd_action --action=restart --service_name=fail2ban ynh_systemd_action --action=restart --service_name=fail2ban

View file

@ -51,10 +51,6 @@ ynh_add_systemd_config
yunohost service add $app --description="Realtime kanban board for workgroups" --log="/var/log/$app/$app.log" 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="/var/log/nginx/${domain}-error.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
#================================================= #=================================================
# RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...) # RECONFIGURE THE APP (UPDATE CONF, APPLY MIGRATIONS...)
#================================================= #=================================================
@ -67,6 +63,17 @@ ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env" chmod 400 "$install_dir/.env"
chown $app:$app "$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
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
@ -74,6 +81,12 @@ ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" 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: <ADDR>\)$"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================