Fix generation of SECRET_STRING_MD5 value

This commit is contained in:
evgeniy-antonyuk 2022-02-28 12:07:54 +03:00
parent fb0cdb605d
commit dc99367302

View file

@ -461,9 +461,7 @@ update_nginx_settings(){
fi
if [ -f "${NGINX_ONLYOFFICE_PATH}/includes/ds-docservice.conf" ] && [ -f "${CONF_DIR}/default.json" ]; then
SECRET_STRING_MD5=${SECRET_STRING_MD5:-$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 20)}
sed "s/verysecretstring/${SECRET_STRING_MD5}/" -i ${NGINX_ONLYOFFICE_PATH}/includes/ds-docservice.conf
$JSON_BIN -I -q -f "${CONF_DIR}/default.json" -e "this.storage.fs.secretString = '$SECRET_STRING_MD5'"
bash /usr/bin/documentserver-update-securelink.sh
fi
}