File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -349,6 +349,33 @@ initialConfiguration() {
349349 secretsConfiguration
350350 authenticationBackends
351351 zulipConfiguration
352+ else
353+ # Check that the configuration will work
354+ root_path=" /etc/zulip"
355+ if [ " $LINK_SETTINGS_TO_DATA " = " True" ] || [ " $LINK_SETTINGS_TO_DATA " = " true" ]; then
356+ root_path=" /data/settings/etc-zulip"
357+ fi
358+ failure=0
359+ for conf_file in zulip.conf zulip-secrets.conf settings.py; do
360+ if [ ! -f " /etc/zulip/$conf_file " ]; then
361+ echo " ERROR: $root_path /$conf_file does not exist!"
362+ failure=1
363+ elif ! sudo -u zulip test -r " /etc/zulip/$conf_file " ; then
364+ echo " ERROR: $root_path /$conf_file is not readable by the zulip user (UID $( id -u zulip) )"
365+ failure=1
366+ elif [ ! -s " /etc/zulip/$conf_file " ]; then
367+ echo " ERROR: $root_path /$conf_file is empty"
368+ failure=1
369+ fi
370+ done
371+ if [ " $failure " = " 1" ]; then
372+ ls -l /etc/zulip/
373+ exit 1
374+ fi
375+ if ! su zulip -c " /home/zulip/deployments/current/manage.py checkconfig" ; then
376+ echo " Error in the Zulip configuration. Exiting."
377+ exit 1
378+ fi
352379 fi
353380 autoBackupConfiguration
354381 echo " === End Initial Configuration Phase ==="
You can’t perform that action at this time.
0 commit comments