From 3d0514e5336d949e81a6a65b839d8f60891820aa Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Wed, 8 Nov 2023 20:37:32 +0000 Subject: [PATCH] Fixed empty variable issue (again) --- xmpp-wizard.sh | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/xmpp-wizard.sh b/xmpp-wizard.sh index 854a191..f6c1e2d 100644 --- a/xmpp-wizard.sh +++ b/xmpp-wizard.sh @@ -743,11 +743,6 @@ shaper_rules: normal: all s2s_shaper: fast" -upload2=" - soft_upload_quota: - $softquota: all # MB - hard_upload_quota: - $hardquota: all # MB" modules1=" modules: @@ -878,6 +873,31 @@ the user has on the server is less than the soft quota. Would you like to enable HTTP uploads?" httpuploads if [ "$httpuploads" == "y" ]; then + read -p "What soft quota would you like to set per user? (MB): " softquota + while read -p "$softquota MB is this correct? (y/n):" confirm; do + if [ "$confirm" == "y" ]; then + break + else + read -p "What soft quota would you like to set per user? (MB): " softquota + continue + fi + done + + read -p "What hard quota would you like to set per user? (MB): " hardquota + while read -p "$hardquota MB is this correct? (y/n): " confirm; do + if [ "$confirm" == "y" ]; then + break + else + read -p "What hard quota would you like to set per user? (MB): " hardquota + continue + fi + done + upload2=" + soft_upload_quota: + $softquota: all # MB + hard_upload_quota: + $hardquota: all # MB" + if [ "$stunturn" == "y" ]; then config+=${upload1} config+=${stun1} @@ -897,26 +917,6 @@ if [ "$httpuploads" == "y" ]; then config+=${modules2} config+=${footer} fi - - read -p "What soft quota would you like to set per user? (MB): " softquota - while read -p "$softquota MB is this correct? (y/n): " confirm; do - if [ "$confirm" == "y" ]; then - break - else - read -p "What soft quota would you like to set per user? (MB): " softquota - continue - fi - done - - read -p "What hard quota would you like to set per user? (MB): " hardquota - while read -p "$hardquota MB is this correct? (y/n): " confirm; do - if [ "$confirm" == "y" ]; then - break - else - read -p "What hard quota would you like to set per user? (MB): " hardquota - continue - fi - done else if [ "$stunturn" == "y" ]; then config+=${stun1}