refactor(templates): wrap shell variables in conditions with double quotes

This commit is contained in:
emrah
2026-02-12 19:30:21 +03:00
committed by Saúl Ibarra Corretgé
parent 156e36e97f
commit ab3a7c2621
6 changed files with 10 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ if ! shm-check; then
exit 1 exit 1
fi 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' echo 'FATAL ERROR: Jibri recorder password and auth password must be set'
exit 1 exit 1
fi fi

View File

@@ -2,7 +2,7 @@
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jicofo | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}" 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' echo 'FATAL ERROR: Jicofo auth password must be set'
exit 1 exit 1
fi fi

View File

@@ -2,7 +2,7 @@
export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jigasi | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}" 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' echo 'FATAL ERROR: Jigasi auth password must be set'
exit 1 exit 1
fi fi
@@ -65,7 +65,7 @@ elif [[ "$JIGASI_MODE" == "transcriber" ]]; then
chown jigasi:jitsi /tmp/transcripts chown jigasi:jitsi /tmp/transcripts
# Create Google Cloud Credentials # 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' echo 'Transcriptions: One or more gcloud environment variables are undefined, skipping gcloud credentials file /config/key.json'
else else
jq -n \ jq -n \

View File

@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
if [[ -z $JVB_DISABLE_XMPP ]]; then if [[ -z "$JVB_DISABLE_XMPP" ]]; then
if [[ -z $JVB_AUTH_PASSWORD ]]; then if [[ -z "$JVB_AUTH_PASSWORD" ]]; then
echo 'FATAL ERROR: JVB auth password must be set' echo 'FATAL ERROR: JVB auth password must be set'
exit 1 exit 1
fi fi

View File

@@ -65,7 +65,7 @@ fi
tpl /defaults/prosody.cfg.lua > $PROSODY_CFG tpl /defaults/prosody.cfg.lua > $PROSODY_CFG
tpl /defaults/conf.d/$PROSODY_SITE_CFG > /config/conf.d/$PROSODY_SITE_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' echo 'FATAL ERROR: Jicofo auth password must be set'
exit 1 exit 1
fi fi
@@ -83,7 +83,7 @@ fi
# User registration is now handled by the 70-register-setup service after prosody starts # 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' echo 'FATAL ERROR: JVB auth password must be set'
exit 1 exit 1
fi fi

View File

@@ -52,12 +52,12 @@ fi
PROSODY_CFG="/config/prosody.cfg.lua" PROSODY_CFG="/config/prosody.cfg.lua"
# Validate required passwords # 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' echo '[register-setup] FATAL ERROR: Jicofo auth password must be set'
exit 1 exit 1
fi fi
if [[ -z $JVB_AUTH_PASSWORD ]]; then if [[ -z "$JVB_AUTH_PASSWORD" ]]; then
echo '[register-setup] FATAL ERROR: JVB auth password must be set' echo '[register-setup] FATAL ERROR: JVB auth password must be set'
exit 1 exit 1
fi fi