mirror of
https://github.com/YunoHost-Apps/homeassistant_ynh.git
synced 2024-09-03 19:26:16 +02:00
commit
c1690e4f6b
8 changed files with 43 additions and 3 deletions
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
|
||||
Home automation platform
|
||||
|
||||
**Shipped version:** 2023.1.7~ynh1
|
||||
**Shipped version:** 2023.1.7~ynh2
|
||||
|
||||
**Demo:** https://demo.home-assistant.io
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
|
|||
|
||||
Plateforme domotique
|
||||
|
||||
**Version incluse :** 2023.1.7~ynh1
|
||||
**Version incluse :** 2023.1.7~ynh2
|
||||
|
||||
**Démo :** https://demo.home-assistant.io
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Home automation platform",
|
||||
"fr": "Plateforme domotique"
|
||||
},
|
||||
"version": "2023.1.7~ynh1",
|
||||
"version": "2023.1.7~ynh2",
|
||||
"url": "https://github.com/home-assistant/home-assistant",
|
||||
"upstream": {
|
||||
"license": "Apache-2.0",
|
||||
|
|
|
@ -58,6 +58,13 @@ ynh_backup --src_path="$data_path" --is_big
|
|||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# BACKUP FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_backup --src_path="/etc/fail2ban/jail.d/$app.conf"
|
||||
ynh_backup --src_path="/etc/fail2ban/filter.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
|
|
|
@ -183,6 +183,14 @@ ynh_store_file_checksum --file="/etc/systemd/system/$app.service"
|
|||
systemctl daemon-reload
|
||||
ynh_systemd_action --service_name=$app --action=restart
|
||||
|
||||
#=================================================
|
||||
# SETUP FAIL2BAN
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring Fail2Ban..." --weight=1
|
||||
|
||||
# Create a dedicated Fail2Ban config
|
||||
ynh_add_fail2ban_config --logpath="$log_file" --failregex="Login attempt or request with invalid authentication from <HOST>"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
|
@ -91,6 +91,14 @@ ynh_script_progression --message="Removing dependencies..."
|
|||
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing Fail2Ban configuration..." --weight=1
|
||||
|
||||
# Remove the dedicated Fail2Ban config
|
||||
ynh_remove_fail2ban_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
|
|
|
@ -79,6 +79,15 @@ ynh_restore_file --origin_path="$data_path" --not_mandatory
|
|||
|
||||
mkdir -p $data_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE FAIL2BAN CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the Fail2Ban configuration..." --weight=1
|
||||
|
||||
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
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
#=================================================
|
||||
|
|
|
@ -112,6 +112,14 @@ ynh_script_progression --message="Upgrading systemd configuration..."
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config
|
||||
|
||||
#=================================================
|
||||
# SETUP FAIL2BAN
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reconfiguring Fail2Ban..." --weight=1
|
||||
|
||||
# Create a dedicated Fail2Ban config
|
||||
ynh_add_fail2ban_config --logpath="$log_file" --failregex="Login attempt or request with invalid authentication from <HOST>"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue