Improve data input arrangement

This commit is contained in:
Luis Guzmán 2020-04-12 11:14:04 -05:00
parent ecc23496f3
commit beb1a75715
1 changed files with 55 additions and 41 deletions

View File

@ -258,14 +258,14 @@ JB_NAME="Jibri Sessions"
LE_RENEW_LOG="/var/log/letsencrypt/renew.log" LE_RENEW_LOG="/var/log/letsencrypt/renew.log"
MOD_LISTU="https://prosody.im/files/mod_listusers.lua" MOD_LISTU="https://prosody.im/files/mod_listusers.lua"
MOD_LIST_FILE="/usr/lib/prosody/modules/mod_listusers.lua" MOD_LIST_FILE="/usr/lib/prosody/modules/mod_listusers.lua"
#Language
echo "## Setting up Jitsi Meet language ## echo "## Setting up Jitsi Meet language ##
You can define your language by using a two letter code (ISO 639-1); You can define the language, for a complete list of the supported languages
English -> en
Spanish -> es
German -> de
...
Jitsi Meet web interface will be set to use such language (if availabe). See here:
https://github.com/jitsi/jitsi-meet/blob/master/lang/languages.json
Jitsi Meet web interface will be set to use such language.
" "
read -p "Please set your language:"$'\n' -r LANG read -p "Please set your language:"$'\n' -r LANG
read -p "Set sysadmin email: "$'\n' -r SYSADMIN_EMAIL read -p "Set sysadmin email: "$'\n' -r SYSADMIN_EMAIL
@ -279,16 +279,6 @@ elif [ $DROP_TLS1 = yes ]; then
echo "TLSv1.0/1.1 will be dropped" echo "TLSv1.0/1.1 will be dropped"
fi fi
done done
#Dropbox
while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]]
do
read -p "> Do you want to setup the Dropbox feature now: (yes or no)"$'\n' -r ENABLE_DB
if [ $ENABLE_DB = no ]; then
echo "Dropbox won't be enable"
elif [ $ENABLE_DB = yes ]; then
read -p "Please set your Drobbox App key: "$'\n' -r DB_CID
fi
done
#SSL LE #SSL LE
while [[ $ENABLE_SSL != yes && $ENABLE_SSL != no ]] while [[ $ENABLE_SSL != yes && $ENABLE_SSL != no ]]
do do
@ -299,6 +289,16 @@ elif [ $ENABLE_SSL = yes ]; then
echo "SSL will be enabled." echo "SSL will be enabled."
fi fi
done done
#Dropbox
while [[ $ENABLE_DB != yes && $ENABLE_DB != no ]]
do
read -p "> Do you want to setup the Dropbox feature now: (yes or no)"$'\n' -r ENABLE_DB
if [ $ENABLE_DB = no ]; then
echo "Dropbox won't be enable"
elif [ $ENABLE_DB = yes ]; then
read -p "Please set your Drobbox App key: "$'\n' -r DB_CID
fi
done
#Brandless Mode #Brandless Mode
while [[ $ENABLE_BLESSM != yes && $ENABLE_BLESSM != no ]] while [[ $ENABLE_BLESSM != yes && $ENABLE_BLESSM != no ]]
do do
@ -309,24 +309,23 @@ elif [ $ENABLE_BLESSM = yes ]; then
echo "Brandless mode will be set." echo "Brandless mode will be set."
fi fi
done done
#Jibri Records Access (JRA) via Nextcloud echo "We'll take a minute to localize some UI excerpts if you need."
while [[ $ENABLE_NC_ACCESS != yes && $ENABLE_NC_ACCESS != no ]] #Participant
echo "> Do you want to translate 'Participant' to your own language?"
read -p "Leave empty to use the default one:" L10N_PARTICIPANT
#Me
echo "> Do you want to translate 'me' to your own language?
This must be a really small word to present one self.
Some suggestions might be: yo (Spanish) | je (French) | ich (German)"
read -p "Leave empty to use the default one:" L10N_ME
#Welcome Page
while [[ $ENABLE_WELCP != yes && $ENABLE_WELCP != no ]]
do do
read -p "> Do you want to setup Jibri Records Access via Nextcloud: (yes or no)"$'\n' -r ENABLE_NC_ACCESS read -p "> Do you want to disable the Welcome page: (yes or no)"$'\n' -r ENABLE_WELCP
if [ $ENABLE_NC_ACCESS = no ]; then if [ $ENABLE_WELCP = yes ]; then
echo "JRA via Nextcloud won't be enabled." echo "Welcome page will be disabled."
elif [ $ENABLE_NC_ACCESS = yes ]; then elif [ $ENABLE_WELCP = no ]; then
echo "JRA via Nextcloud will be enabled." echo "Welcome page will be enabled."
fi
done
#Jigasi
while [[ $ENABLE_TRANSCRIPT != yes && $ENABLE_TRANSCRIPT != no ]]
do
read -p "> Do you want to setup Jigasi Transcription: (yes or no)"$'\n' -r ENABLE_TRANSCRIPT
if [ $ENABLE_TRANSCRIPT = no ]; then
echo "Jigasi Transcription won't be enabled."
elif [ $ENABLE_TRANSCRIPT = yes ]; then
echo "Jigasi Transcription will be enabled."
fi fi
done done
#Enable static avatar #Enable static avatar
@ -361,14 +360,24 @@ elif [ "$ENABLE_SC" = "yes" ]; then
read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS read -p "Secure room moderator password: "$'\n' -r SEC_ROOM_PASS
fi fi
done done
#Welcome Page #Jibri Records Access (JRA) via Nextcloud
while [[ $ENABLE_WELCP != yes && $ENABLE_WELCP != no ]] while [[ $ENABLE_NC_ACCESS != yes && $ENABLE_NC_ACCESS != no ]]
do do
read -p "> Do you want to disable the Welcome page: (yes or no)"$'\n' -r ENABLE_WELCP read -p "> Do you want to setup Jibri Records Access via Nextcloud: (yes or no)"$'\n' -r ENABLE_NC_ACCESS
if [ $ENABLE_WELCP = yes ]; then if [ $ENABLE_NC_ACCESS = no ]; then
echo "Welcome page will be disabled." echo "JRA via Nextcloud won't be enabled."
elif [ $ENABLE_WELCP = no ]; then elif [ $ENABLE_NC_ACCESS = yes ]; then
echo "Welcome page will be enabled." echo "JRA via Nextcloud will be enabled."
fi
done
#Jigasi
while [[ $ENABLE_TRANSCRIPT != yes && $ENABLE_TRANSCRIPT != no ]]
do
read -p "> Do you want to setup Jigasi Transcription: (yes or no)"$'\n' -r ENABLE_TRANSCRIPT
if [ $ENABLE_TRANSCRIPT = no ]; then
echo "Jigasi Transcription won't be enabled."
elif [ $ENABLE_TRANSCRIPT = yes ]; then
echo "Jigasi Transcription will be enabled."
fi fi
done done
#Start configuration #Start configuration
@ -457,7 +466,12 @@ sed -i "s|c2s_require_encryption = .*|c2s_require_encryption = false|" $PROSODY_
sed -i "/c2s_require_encryption = false/a \\ sed -i "/c2s_require_encryption = false/a \\
\\ \\
consider_bosh_secure = true" $PROSODY_SYS consider_bosh_secure = true" $PROSODY_SYS
if [ ! -z $L10N_PARTICIPANT ]; then
sed -i "s|PART_USER=.*|PART_USER=\"$L10N_PARTICIPANT\"|" jb-bm.sh
fi
if [ ! -z $L10N_ME ]; then
sed -i "s|LOCAL_USER=.*|LOCAL_USER=\"$L10N_PARTICIPANT\"|" jb-bm.sh
fi
if [ ! -f $MOD_LIST_FILE ]; then if [ ! -f $MOD_LIST_FILE ]; then
echo " echo "
-> Adding external module to list prosody users... -> Adding external module to list prosody users...