| 12345678910111213141516171819202122232425262728293031 | #!/bin/bash# get wekan/mongo settingssource $SNAP/bin/wekan-read-settingsif [ "true" == "${DISABLE_MONGODB}" ]; then    echo "mongodb is disabled. Not starting it"    exit 0fi# make sure we have set minimum env variables for localeif [ -z "$LANG" ]; then    export LANG=en_US.UTF-8fiexport LC_ALL=C# start mongo deamonBIND_OPTIONS=""if [ "nill" != "$MONGODB_BIND_UNIX_SOCKET" ] && [ "x" != "x${MONGODB_BIND_UNIX_SOCKET}" ]; then    BIND_OPTIONS+=" --unixSocketPrefix  $MONGODB_BIND_UNIX_SOCKET"fiif [ "x" != "x${MONGODB_BIND_IP}" ]; then    BIND_OPTIONS+=" --bind_ip $MONGODB_BIND_IP"fiif [ "x" != "x${MONGODB_PORT}" ]; then    BIND_OPTIONS+=" --port $MONGODB_PORT"fiecho "mongodb bind options: $BIND_OPTIONS"mongod --dbpath $SNAP_COMMON --logpath $SNAP_COMMON/mongodb.log --logappend --journal $BIND_OPTIONS
 |