Skip to content
4 changes: 2 additions & 2 deletions base/rootfs/etc/cont-init.d/01-set-timezone
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash

if [[ ! -z "$TZ" ]]; then
if [[ -f /usr/share/zoneinfo/$TZ ]]; then
if [[ -n "$TZ" ]]; then
if [[ -f "/usr/share/zoneinfo/$TZ" ]]; then
ln -sf /usr/share/zoneinfo/$TZ /etc/localtime
echo "$TZ" > /etc/timezone
else
Expand Down
2 changes: 1 addition & 1 deletion env.example
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ TZ=UTC
#JIGASI_SIP_URI=test@sip2sip.info

# Password for the specified SIP account as a clear text
#JIGASI_SIP_PASSWORD=passw0rd
#JIGASI_SIP_PASSWORD=

# SIP server (use the SIP account domain if in doubt)
#JIGASI_SIP_SERVER=sip2sip.info
Expand Down
14 changes: 1 addition & 13 deletions jibri/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,12 @@ if [[ -z $JIBRI_RECORDER_PASSWORD || -z $JIBRI_XMPP_PASSWORD ]]; then
exit 1
fi

OLD_JIBRI_RECORDER_PASSWORD=passw0rd
if [[ "$JIBRI_RECORDER_PASSWORD" == "$OLD_JIBRI_RECORDER_PASSWORD" ]]; then
echo 'FATAL ERROR: Jibri recorder password must be changed, check the README'
exit 1
fi

OLD_JIBRI_XMPP_PASSWORD=passw0rd
if [[ "$JIBRI_XMPP_PASSWORD" == "$OLD_JIBRI_XMPP_PASSWORD" ]]; then
echo 'FATAL ERROR: Jibri auth password must be changed, check the README'
exit 1
fi

# DISPLAY is necessary for start
[ -z "${DISPLAY}" ] \
&& ( echo -e "\e[31mERROR: Please set DISPLAY variable.\e[39m"; kill 1; exit 1 )

# script for finalizing must have executing bit.
[ ! -z "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \
[ -n "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \
&& [ -f "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \
&& [ ! -x "${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}" ] \
&& chmod +x ${JIBRI_FINALIZE_RECORDING_SCRIPT_PATH}
Expand Down
6 changes: 0 additions & 6 deletions jicofo/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ if [[ -z $JICOFO_AUTH_PASSWORD ]]; then
exit 1
fi

OLD_JICOFO_AUTH_PASSWORD=passw0rd
if [[ "$JICOFO_AUTH_PASSWORD" == "$OLD_JICOFO_AUTH_PASSWORD" ]]; then
echo 'FATAL ERROR: Jicofo auth password must be changed, check the README'
exit 1
fi

# maintain backward compatibility with older variable
[ -z "${XMPP_HIDDEN_DOMAIN}" ] && export XMPP_HIDDEN_DOMAIN="$XMPP_RECORDER_DOMAIN"

Expand Down
10 changes: 2 additions & 8 deletions jigasi/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ if [[ -z $JIGASI_XMPP_PASSWORD ]]; then
exit 1
fi

OLD_JIGASI_XMPP_PASSWORD=passw0rd
if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then
echo 'FATAL ERROR: Jigasi auth password must be changed, check the README'
exit 1
fi

[ -z "$JIGASI_MODE" ] && JIGASI_MODE="sip"
JIGASI_MODE="$(echo $JIGASI_MODE | tr '[:upper:]' '[:lower:]')"

Expand Down Expand Up @@ -97,10 +91,10 @@ elif [[ "$JIGASI_MODE" == "transcriber" ]]; then
fi
fi

if [[ -f /config/custom-sip-communicator.properties ]]; then
if [[ -f "/config/custom-sip-communicator.properties" ]]; then
cat /config/custom-sip-communicator.properties >> /config/sip-communicator.properties
fi
if [[ -f /config/custom-logging.properties ]]; then
if [[ -f "/config/custom-logging.properties" ]]; then
cat /config/custom-logging.properties >> /config/logging.properties
fi

Expand Down
10 changes: 2 additions & 8 deletions jvb/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ if [[ -z $JVB_DISABLE_XMPP ]]; then
exit 1
fi

OLD_JVB_AUTH_PASSWORD=passw0rd
if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
echo 'FATAL ERROR: JVB auth password must be changed, check the README'
exit 1
fi

[ -z "${XMPP_SERVER}" ] && export XMPP_SERVER=xmpp.meet.jitsi

# On environments like Swarm the IP address used by the default gateway need not be
Expand All @@ -22,7 +16,7 @@ fi

# Migration from DOCKER_HOST_ADDRESS to JVB_ADVERTISE_IPS
if [[ -z "${JVB_ADVERTISE_IPS}" ]]; then
if [[ ! -z "${DOCKER_HOST_ADDRESS}" ]]; then
if [[ -n "${DOCKER_HOST_ADDRESS}" ]]; then
echo "WARNING: DOCKER_HOST_ADDRESS is deprecated, migrate to JVB_ADVERTISE_IPS"
export JVB_ADVERTISE_IPS=${DOCKER_HOST_ADDRESS}
fi
Expand All @@ -33,7 +27,7 @@ export LOCAL_ADDRESS=$(ip route get 1 | grep -oP '(?<=src ).*' | awk '{ print $1

export SENTRY_RELEASE="${SENTRY_RELEASE:-$(apt-cache policy jitsi-videobridge2 | sed -n '/Installed/p' | sed -e 's/[^:]*: //')}"

if [[ -f /config/custom-sip-communicator.properties ]]; then
if [[ -f "/config/custom-sip-communicator.properties" ]]; then
cat /config/custom-sip-communicator.properties > /config/sip-communicator.properties
fi

Expand Down
40 changes: 4 additions & 36 deletions prosody/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/with-contenv bash

if [[ ! -f /etc/saslauthd.conf ]] && [[ "$AUTH_TYPE" == "ldap" ]]; then
if [[ ! -f "/etc/saslauthd.conf" ]] && [[ "$AUTH_TYPE" == "ldap" ]]; then
tpl /defaults/saslauthd.conf > /etc/saslauthd.conf
mkdir -pm777 /var/run/saslauthd
adduser prosody sasl
Expand Down Expand Up @@ -88,56 +88,24 @@ if [[ -z $JVB_AUTH_PASSWORD ]]; then
exit 1
fi

OLD_JVB_AUTH_PASSWORD=passw0rd
if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
echo 'FATAL ERROR: JVB auth password must be changed, check the README'
exit 1
fi

if [[ ! -z $JIBRI_XMPP_PASSWORD ]]; then
OLD_JIBRI_XMPP_PASSWORD=passw0rd
if [[ "$JIBRI_XMPP_PASSWORD" == "$OLD_JIBRI_XMPP_PASSWORD" ]]; then
echo 'FATAL ERROR: Jibri auth password must be changed, check the README'
exit 1
fi
fi

if [[ "$PROSODY_MODE" == "client" ]]; then
if [[ ! -z $JIBRI_RECORDER_PASSWORD ]]; then
OLD_JIBRI_RECORDER_PASSWORD=passw0rd
if [[ "$JIBRI_RECORDER_PASSWORD" == "$OLD_JIBRI_RECORDER_PASSWORD" ]]; then
echo 'FATAL ERROR: Jibri recorder password must be changed, check the README'
exit 1
fi
fi
fi

if [[ ! -z $JIGASI_XMPP_PASSWORD ]]; then
OLD_JIGASI_XMPP_PASSWORD=passw0rd
if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then
echo 'FATAL ERROR: Jigasi auth password must be changed, check the README'
exit 1
fi
fi

if [[ "$PROSODY_MODE" == "visitors" ]]; then
[ -z "$VISITORS_XMPP_DOMAIN" ] && VISITORS_XMPP_DOMAIN="meet.jitsi"
[ -z "$PROSODY_VISITOR_INDEX" ] && PROSODY_VISITOR_INDEX=0
FULL_VISITORS_XMPP_DOMAIN="v$PROSODY_VISITOR_INDEX.$VISITORS_XMPP_DOMAIN"
if [[ ! -f /config/certs/$FULL_VISITORS_XMPP_DOMAIN.crt ]]; then
if [[ ! -f "/config/certs/$FULL_VISITORS_XMPP_DOMAIN.crt" ]]; then
# echo for using all default values
echo | prosodyctl --config $PROSODY_CFG cert generate $FULL_VISITORS_XMPP_DOMAIN
fi
elif [[ "$PROSODY_MODE" == "brewery" ]]; then
echo "No need to generate certs for main XMPP domain in brewery mode"
else
if [[ ! -f /config/certs/$XMPP_DOMAIN.crt ]]; then
if [[ ! -f "/config/certs/$XMPP_DOMAIN.crt" ]]; then
# echo for using all default values
echo | prosodyctl --config $PROSODY_CFG cert generate $XMPP_DOMAIN
fi
fi

if [[ ! -f /config/certs/$XMPP_AUTH_DOMAIN.crt ]]; then
if [[ ! -f "/config/certs/$XMPP_AUTH_DOMAIN.crt" ]]; then
# echo for using all default values
echo | prosodyctl --config $PROSODY_CFG cert generate $XMPP_AUTH_DOMAIN
fi
Expand Down
2 changes: 1 addition & 1 deletion prosody/rootfs/etc/services.d/10-saslauthd/run
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash
if [[ -f /etc/saslauthd.conf ]]; then
if [[ -f "/etc/saslauthd.conf" ]]; then
exec s6-setuidgid root saslauthd -a ldap -O /etc/saslauthd.conf -c -m /var/run/saslauthd -n 5 -d
else
# if saslauthd should not be started,
Expand Down
24 changes: 4 additions & 20 deletions prosody/rootfs/etc/services.d/70-register-setup/run
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@ if [[ -z $JVB_AUTH_PASSWORD ]]; then
exit 1
fi

OLD_JVB_AUTH_PASSWORD=passw0rd
if [[ "$JVB_AUTH_PASSWORD" == "$OLD_JVB_AUTH_PASSWORD" ]]; then
echo '[register-setup] FATAL ERROR: JVB auth password must be changed, check the README'
exit 1
fi

# Register focus user
echo "[register-setup] Registering focus user..."
OUTPUT=$(prosodyctl --config $PROSODY_CFG shell user create focus@$XMPP_AUTH_DOMAIN $JICOFO_AUTH_PASSWORD 2>&1)
Expand All @@ -87,12 +81,7 @@ else
fi

# Register Jibri user if password is set
if [[ ! -z $JIBRI_XMPP_PASSWORD ]]; then
OLD_JIBRI_XMPP_PASSWORD=passw0rd
if [[ "$JIBRI_XMPP_PASSWORD" == "$OLD_JIBRI_XMPP_PASSWORD" ]]; then
echo '[register-setup] FATAL ERROR: Jibri auth password must be changed, check the README'
exit 1
fi
if [[ -n "$JIBRI_XMPP_PASSWORD" ]]; then
echo "[register-setup] Registering Jibri user..."
OUTPUT=$(prosodyctl --config $PROSODY_CFG shell user create $JIBRI_XMPP_USER@$XMPP_AUTH_DOMAIN $JIBRI_XMPP_PASSWORD 2>&1)
if [ $? -eq 0 ]; then
Expand All @@ -105,7 +94,7 @@ fi
# Register Jibri recorder and Jigasi transcriber in client mode only
if [[ "$PROSODY_MODE" == "client" ]]; then
if [[ "$(echo "$ENABLE_RECORDING" | tr '[:upper:]' '[:lower:]')" == "true" ]] || [[ "$ENABLE_RECORDING" == "1" ]]; then
if [[ ! -z $JIBRI_RECORDER_PASSWORD ]]; then
if [[ -n "$JIBRI_RECORDER_PASSWORD" ]]; then
echo "[register-setup] Registering Jibri recorder user..."
OUTPUT=$(prosodyctl --config $PROSODY_CFG shell user create $JIBRI_RECORDER_USER@$XMPP_HIDDEN_DOMAIN $JIBRI_RECORDER_PASSWORD 2>&1)
if [ $? -eq 0 ]; then
Expand All @@ -117,7 +106,7 @@ if [[ "$PROSODY_MODE" == "client" ]]; then
fi

if [[ "$(echo "$ENABLE_TRANSCRIPTIONS" | tr '[:upper:]' '[:lower:]')" == "true" ]] || [[ "$ENABLE_TRANSCRIPTIONS" == "1" ]]; then
if [[ ! -z $JIGASI_TRANSCRIBER_PASSWORD ]]; then
if [[ -n "$JIGASI_TRANSCRIBER_PASSWORD" ]]; then
[ -z "$JIGASI_TRANSCRIBER_USER" ] && JIGASI_TRANSCRIBER_USER="transcriber"
echo "[register-setup] Registering Jigasi transcriber user..."
OUTPUT=$(prosodyctl --config $PROSODY_CFG shell user create $JIGASI_TRANSCRIBER_USER@$XMPP_HIDDEN_DOMAIN $JIGASI_TRANSCRIBER_PASSWORD 2>&1)
Expand All @@ -131,12 +120,7 @@ if [[ "$PROSODY_MODE" == "client" ]]; then
fi

# Register Jigasi user if password is set
if [[ ! -z $JIGASI_XMPP_PASSWORD ]]; then
OLD_JIGASI_XMPP_PASSWORD=passw0rd
if [[ "$JIGASI_XMPP_PASSWORD" == "$OLD_JIGASI_XMPP_PASSWORD" ]]; then
echo '[register-setup] FATAL ERROR: Jigasi auth password must be changed, check the README'
exit 1
fi
if [[ -n "$JIGASI_XMPP_PASSWORD" ]]; then
echo "[register-setup] Registering Jigasi user..."
OUTPUT=$(prosodyctl --config $PROSODY_CFG shell user create $JIGASI_XMPP_USER@$XMPP_AUTH_DOMAIN $JIGASI_XMPP_PASSWORD 2>&1)
if [ $? -eq 0 ]; then
Expand Down
2 changes: 1 addition & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set -e
# Don't start a release if the tree is dirty
#

if [[ ! -z $(git status -s) ]]; then
if [[ -n $(git status -s) ]]; then
echo "Git tree is not clean, aborting release!"
exit 1
fi
Expand Down
10 changes: 5 additions & 5 deletions web/rootfs/etc/cont-init.d/10-config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
fi

ACME_SERVER=""
if [[ ! -z $LETSENCRYPT_ACME_SERVER ]]; then
if [[ -n "$LETSENCRYPT_ACME_SERVER" ]]; then
ACME_SERVER="--set-default-ca --server $LETSENCRYPT_ACME_SERVER"
echo "Using custom ACME server: $LETSENCRYPT_ACME_SERVER"
fi
Expand Down Expand Up @@ -61,7 +61,7 @@ if [[ $DISABLE_HTTPS -ne 1 ]]; then
fi
else
# use self-signed certs
if [[ -f /config/keys/cert.key && -f /config/keys/cert.crt ]]; then
if [[ -f "/config/keys/cert.key" && -f "/config/keys/cert.crt" ]]; then
echo "using keys found in /config/keys"
else
echo "generating self-signed keys in /config/keys, you can replace these with your own keys if required"
Expand Down Expand Up @@ -122,7 +122,7 @@ fi
tpl /defaults/nginx.conf > /config/nginx/nginx.conf

tpl /defaults/meet.conf > /config/nginx/meet.conf
if [[ -f /config/nginx/custom-meet.conf ]]; then
if [[ -f "/config/nginx/custom-meet.conf" ]]; then
cat /config/nginx/custom-meet.conf >> /config/nginx/meet.conf
fi

Expand All @@ -132,11 +132,11 @@ tpl /defaults/default > /config/nginx/site-confs/default

tpl /defaults/system-config.js > /config/config.js
tpl /defaults/settings-config.js >> /config/config.js
if [[ -f /config/custom-config.js ]]; then
if [[ -f "/config/custom-config.js" ]]; then
cat /config/custom-config.js >> /config/config.js
fi

cp /defaults/interface_config.js /config/interface_config.js
if [[ -f /config/custom-interface_config.js ]]; then
if [[ -f "/config/custom-interface_config.js" ]]; then
cat /config/custom-interface_config.js >> /config/interface_config.js
fi
6 changes: 3 additions & 3 deletions web/rootfs/etc/services.d/jaas-account/run
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ function stop_service() {
exit 0
}

if [[ $DISABLE_HTTPS -ne 1 ]] && [[ $ENABLE_LETSENCRYPT -eq 1 ]] && [[ $ENABLE_JAAS_COMPONENTS -eq 1 ]] && [[ ! -z $EMAIL ]] && [[ ! -z $DOMAIN ]]; then
if [[ "$DISABLE_HTTPS" -ne 1 ]] && [[ "$ENABLE_LETSENCRYPT" -eq 1 ]] && [[ "$ENABLE_JAAS_COMPONENTS" -eq 1 ]] && [[ -n "$EMAIL" ]] && [[ -n "$DOMAIN" ]]; then

if [ -f $JAAS_ACCOUNT_FILE ]; then
if [ -f "$JAAS_ACCOUNT_FILE" ]; then
echo "JaaS account already exists"
stop_service
fi
Expand Down Expand Up @@ -119,4 +119,4 @@ done)
rm ${CHALLENGE_FILE} || true

fi
stop_service
stop_service