Compare commits

...

2 Commits

Author SHA1 Message Date
jacob.eva
1f0d58acd7
Make prompts look nicer 2023-11-08 20:38:52 +00:00
jacob.eva
3d0514e533
Fixed empty variable issue (again) 2023-11-08 20:37:32 +00:00

View File

@ -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:
@ -868,36 +863,16 @@ read -p "Some XMPP clients may support P2P voice / video calls, but will require
assistance from the server in order to be able to connect to each other through
networks with NAT (almost every network).
Would you like to enable the STUN/TURN server within ejabberd to relay traffic
for these clients so their calls will work correctly?" stunturn
for these clients so their calls will work correctly? (y/n): " stunturn
read -p "HTTP uploads (XEP-0363) in XMPP are stored on the server itself. There
are many different parameters you can configure with respect to HTTP uploads. A
soft quota can be set per user, along with a hard quota. After the hard quota
is exceeded, files are deleted from the oldest until the total size of files
the user has on the server is less than the soft quota.
Would you like to enable HTTP uploads?" httpuploads
Would you like to enable HTTP uploads? (y/n): " httpuploads
if [ "$httpuploads" == "y" ]; then
if [ "$stunturn" == "y" ]; then
config+=${upload1}
config+=${stun1}
config+=${midsection}
config+=${upload2}
config+=${modules}
config+=${upload3}
config+=${modules2}
config+=${stun2}
config+=${footer}
else
config+=${upload1}
config+=${midsection}
config+=${upload2}
config+=${modules}
config+=${upload3}
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
@ -917,6 +892,31 @@ if [ "$httpuploads" == "y" ]; then
continue
fi
done
upload2="
soft_upload_quota:
$softquota: all # MB
hard_upload_quota:
$hardquota: all # MB"
if [ "$stunturn" == "y" ]; then
config+=${upload1}
config+=${stun1}
config+=${midsection}
config+=${upload2}
config+=${modules}
config+=${upload3}
config+=${modules2}
config+=${stun2}
config+=${footer}
else
config+=${upload1}
config+=${midsection}
config+=${upload2}
config+=${modules}
config+=${upload3}
config+=${modules2}
config+=${footer}
fi
else
if [ "$stunturn" == "y" ]; then
config+=${stun1}