mirror of
https://github.com/YunoHost-Apps/planka_ynh.git
synced 2024-09-03 20:06:00 +02:00
cleaning
This commit is contained in:
parent
b1d4fb6a21
commit
ef19365bba
6 changed files with 17 additions and 16 deletions
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -25,6 +25,8 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
||||||
|
|
||||||
ynh_change_url_nginx_config
|
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
|
# GENERIC FINALISATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -81,6 +81,8 @@ pushd $install_dir
|
||||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run db:init
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run db:init
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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="$install_dir/logs/planka.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,19 @@ 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
|
||||||
|
|
||||||
|
ynh_add_fail2ban_config --logpath="$install_dir/logs/planka.log" --failregex="^(.*) Invalid (email or username:|password!) (\"(.*)\"!)? ?\(IP: <ADDR>\)$"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue