Try 3 to fix apparmor denied in syslog at Snap Candidate. Changed MongoDB --host back to --bind_ip.

Thanks to webenefits and xet7 !

Fixes #4855
This commit is contained in:
Lauri Ojansivu 2024-09-23 23:08:47 +03:00
parent dfcabc5a36
commit 6c54b38cdf

View file

@ -88,9 +88,9 @@ if [ -z "${MONGO_URL}" ]; then
if [ "nill" != "${MONGODB_BIND_UNIX_SOCKET}" ] && [ "x" != "x${MONGODB_BIND_UNIX_SOCKET}" ]; then
BIND_OPTIONS+=" --unixSocketPrefix ${MONGODB_BIND_UNIX_SOCKET}"
fi
# Newest MongoDB uses --host, not anymore --bind_ip
# Newest MongoDB uses --host or --bind_ip
if [ "x" != "x${MONGODB_BIND_IP}" ]; then
BIND_OPTIONS+=" --host $MONGODB_BIND_IP"
BIND_OPTIONS+=" --bind_ip $MONGODB_BIND_IP"
fi
if [ "x" != "x${MONGODB_PORT}" ]; then
BIND_OPTIONS+=" --port ${MONGODB_PORT}"