refactor(templates): wrap shell variables in conditions with double quotes
This commit is contained in:
committed by
Saúl Ibarra Corretgé
parent
156e36e97f
commit
ab3a7c2621
@@ -12,7 +12,7 @@ if ! shm-check; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $JIBRI_RECORDER_PASSWORD || -z $JIBRI_XMPP_PASSWORD ]]; then
|
||||
if [[ -z "$JIBRI_RECORDER_PASSWORD" || -z "$JIBRI_XMPP_PASSWORD" ]]; then
|
||||
echo 'FATAL ERROR: Jibri recorder password and auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jicofo | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
|
||||
|
||||
if [[ -z $JICOFO_AUTH_PASSWORD ]]; then
|
||||
if [[ -z "$JICOFO_AUTH_PASSWORD" ]]; then
|
||||
echo 'FATAL ERROR: Jicofo auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jigasi | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"
|
||||
|
||||
if [[ -z $JIGASI_XMPP_PASSWORD ]]; then
|
||||
if [[ -z "$JIGASI_XMPP_PASSWORD" ]]; then
|
||||
echo 'FATAL ERROR: Jigasi auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
@@ -65,7 +65,7 @@ elif [[ "$JIGASI_MODE" == "transcriber" ]]; then
|
||||
chown jigasi:jitsi /tmp/transcripts
|
||||
|
||||
# Create Google Cloud Credentials
|
||||
if [[ -z $GC_PROJECT_ID || -z $GC_PRIVATE_KEY_ID || -z $GC_PRIVATE_KEY || -z $GC_CLIENT_EMAIL || -z $GC_CLIENT_ID || -z $GC_CLIENT_CERT_URL ]]; then
|
||||
if [[ -z "$GC_PROJECT_ID" || -z "$GC_PRIVATE_KEY_ID" || -z "$GC_PRIVATE_KEY" || -z "$GC_CLIENT_EMAIL" || -z "$GC_CLIENT_ID" || -z "$GC_CLIENT_CERT_URL" ]]; then
|
||||
echo 'Transcriptions: One or more gcloud environment variables are undefined, skipping gcloud credentials file /config/key.json'
|
||||
else
|
||||
jq -n \
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if [[ -z $JVB_DISABLE_XMPP ]]; then
|
||||
if [[ -z $JVB_AUTH_PASSWORD ]]; then
|
||||
if [[ -z "$JVB_DISABLE_XMPP" ]]; then
|
||||
if [[ -z "$JVB_AUTH_PASSWORD" ]]; then
|
||||
echo 'FATAL ERROR: JVB auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -65,7 +65,7 @@ fi
|
||||
tpl /defaults/prosody.cfg.lua > $PROSODY_CFG
|
||||
tpl /defaults/conf.d/$PROSODY_SITE_CFG > /config/conf.d/$PROSODY_SITE_CFG
|
||||
|
||||
if [[ -z $JICOFO_AUTH_PASSWORD ]]; then
|
||||
if [[ -z "$JICOFO_AUTH_PASSWORD" ]]; then
|
||||
echo 'FATAL ERROR: Jicofo auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
@@ -83,7 +83,7 @@ fi
|
||||
|
||||
# User registration is now handled by the 70-register-setup service after prosody starts
|
||||
|
||||
if [[ -z $JVB_AUTH_PASSWORD ]]; then
|
||||
if [[ -z "$JVB_AUTH_PASSWORD" ]]; then
|
||||
echo 'FATAL ERROR: JVB auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -52,12 +52,12 @@ fi
|
||||
PROSODY_CFG="/config/prosody.cfg.lua"
|
||||
|
||||
# Validate required passwords
|
||||
if [[ -z $JICOFO_AUTH_PASSWORD ]]; then
|
||||
if [[ -z "$JICOFO_AUTH_PASSWORD" ]]; then
|
||||
echo '[register-setup] FATAL ERROR: Jicofo auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z $JVB_AUTH_PASSWORD ]]; then
|
||||
if [[ -z "$JVB_AUTH_PASSWORD" ]]; then
|
||||
echo '[register-setup] FATAL ERROR: JVB auth password must be set'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user