mirror of
https://github.com/YunoHost-Apps/piwigo_ynh.git
synced 2024-09-03 20:06:03 +02:00
Cleaner syntax
This commit is contained in:
parent
aa2407f723
commit
07a268ea3f
1 changed files with 8 additions and 4 deletions
|
@ -597,18 +597,22 @@ ynh_add_fail2ban_config () {
|
|||
ynh_backup_if_checksum_is_different "$finalfail2banjailconf" 1
|
||||
ynh_backup_if_checksum_is_different "$finalfail2banfilterconf" 1
|
||||
|
||||
echo "[$app]
|
||||
echo | sudo tee $finalfail2banjailconf <<EOF
|
||||
[$app]
|
||||
enabled = true
|
||||
port = $ports
|
||||
filter = $app
|
||||
logpath = $logpath
|
||||
maxretry = $max_retry" | sudo tee $finalfail2banjailconf
|
||||
maxretry = $max_retry"
|
||||
EOF
|
||||
|
||||
echo "[INCLUDES]
|
||||
echo | sudo tee $finalfail2banfilterconf <<EOF
|
||||
[INCLUDES]
|
||||
before = common.conf
|
||||
[Definition]
|
||||
failregex = $failregex
|
||||
ignoreregrex =" | sudo tee $finalfail2banfilterconf
|
||||
ignoreregrex ="
|
||||
EOF
|
||||
|
||||
ynh_store_file_checksum "$finalfail2banjailconf"
|
||||
ynh_store_file_checksum "$finalfail2banfilterconf"
|
||||
|
|
Loading…
Add table
Reference in a new issue