Add reusable ability
This commit is contained in:
parent
4b9144d8fb
commit
2fc44ecd72
|
@ -169,11 +169,14 @@ deprecated_var() {
|
||||||
|
|
||||||
update_supervisor_config() {
|
update_supervisor_config() {
|
||||||
if [[ -n ${NODE_OPTIONS} ]]; then
|
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
|
for file in ${SUPERVISOR_CONF_DIR}/ds-converter.conf ${SUPERVISOR_CONF_DIR}/ds-docservice.conf
|
||||||
do
|
do
|
||||||
sed -i "s/environment.*/&\,NODE_OPTIONS=${NODE_OPTIONS}/g" $file
|
sed -i "s|environment.*|&\,NODE_OPTIONS=${NODE_OPTIONS}|g" $file
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue