From 61864e0ac99de7ef519930271a2d7281fcaa74db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 16 Apr 2023 18:31:54 +0200 Subject: [PATCH] Update upgrade --- scripts/upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/upgrade b/scripts/upgrade index d7725cf..531606f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -112,14 +112,14 @@ then chown $app:$app "$install_dir/lutim.conf" # Optional parameters from config-panel feature - if [ -n "$antiflood" ]; then + if [ -n "${antiflood:-}" ]; then ynh_replace_string --match_string=".*anti_flood_delay *=>.*" --replace_string=" anti_flood_delay => $antiflood," --target_file="$install_dir/lutim.conf" # Disable anti_flood_delay if the delay is 0 if [ $antiflood = 0 ]; then ynh_replace_string --match_string="\(anti_flood_delay *=>.*\)" --replace_string="#\1" --target_file="$install_dir/lutim.conf" fi fi - if [ -n "$delay" ]; then + if [ -n "${delay:-}" ]; then ynh_replace_string --match_string=".*default_delay *=>.*" --replace_string=" default_delay => $delay," --target_file="$install_dir/lutim.conf" fi fi