changes nats file watcher to use the NATS_CONFIG variable

This commit is contained in:
sadnub 2022-01-09 21:36:21 -05:00
parent a00b5bb36b
commit a2fac5d946
1 changed files with 3 additions and 3 deletions

View File

@ -23,14 +23,14 @@ config_watcher="$(cat << EOF
while true; do
sleep ${NATS_CONFIG_CHECK_INTERVAL};
if [[ ! -z \${NATS_CHECK} ]]; then
NATS_RELOAD=\$(date -r '/opt/tactical/api/nats-rmm.conf')
NATS_RELOAD=\$(date -r '${NATS_CONFIG}')
if [[ \$NATS_RELOAD == \$NATS_CHECK ]]; then
:
else
nats-server --signal reload;
NATS_CHECK=\$(date -r '/opt/tactical/api/nats-rmm.conf');
NATS_CHECK=\$(date -r '${NATS_CONFIG}');
fi
else NATS_CHECK=\$(date -r '/opt/tactical/api/nats-rmm.conf');
else NATS_CHECK=\$(date -r '${NATS_CONFIG}');
fi
done