diff --git a/run-document-server.sh b/run-document-server.sh index ef37988..792c7f0 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -169,10 +169,13 @@ deprecated_var() { update_supervisor_config() { if [[ -n ${NODE_OPTIONS} ]]; then + RESULT=$(cat ./ds-converter.conf | grep -e 'NODE_OPTIONS') + if [[ -z ${RESULT} ]]; then for file in ${SUPERVISOR_CONF_DIR}/ds-converter.conf ${SUPERVISOR_CONF_DIR}/ds-docservice.conf do - sed -i "s/environment.*/&\,NODE_OPTIONS=${NODE_OPTIONS}/g" $file + sed -i "s|environment.*|&\,NODE_OPTIONS=${NODE_OPTIONS}|g" $file done + fi fi }