summaryrefslogtreecommitdiffstats
path: root/snap-src/bin/mongodb-control
diff options
context:
space:
mode:
Diffstat (limited to 'snap-src/bin/mongodb-control')
-rwxr-xr-xsnap-src/bin/mongodb-control7
1 files changed, 5 insertions, 2 deletions
diff --git a/snap-src/bin/mongodb-control b/snap-src/bin/mongodb-control
index a79785b0..92bc36d6 100755
--- a/snap-src/bin/mongodb-control
+++ b/snap-src/bin/mongodb-control
@@ -15,6 +15,7 @@ if [ -z "$LANG" ]; then
fi
export LC_ALL=C
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/snap/wekan/current/lib/x86_64-linux-gnu
# When starting MongoDB, if logfile exist, delete it, because now uses syslog instead of logfile,
# because syslog usually already has log rotation.
@@ -52,16 +53,18 @@ if [ -z "$MONGO_URL" ]; then
## OLD: Logging to file.
#mongod --dbpath $SNAP_COMMON --logpath $SNAP_COMMON/mongodb.log --logappend --journal $BIND_OPTIONS --smallfiles
## NEW: Logging to syslog, that usually has already log rotation.
- mongod --dbpath $SNAP_COMMON --syslog --journal $BIND_OPTIONS --smallfiles --quiet
+ mongod --dbpath $SNAP_COMMON --syslog --journal $BIND_OPTIONS --quiet
else
## OLD: Logging to file.
#mongod --dbpath $SNAP_COMMON --logpath $SNAP_COMMON/mongodb.log --logappend --journal $MONGO_URL --smallfiles
## NEW: Logging to syslog, that usually has already log rotation.
- mongod --dbpath $SNAP_COMMON --syslog --journal $MONGO_URL --smallfiles --quiet
+ mongod --dbpath $SNAP_COMMON --syslog --journal $MONGO_URL --quiet
fi
# Drop indexes on database upgrade, when starting MongoDB
#mongo wekan --eval "db.getCollectionNames().forEach(function(col_name) { var coll = db.getCollection(col_name); coll.dropIndexes(); });" $BIND_OPTIONS
+
+mongo wekan --eval 'db.adminCommand({ setFeatureCompatibilityVersion: "4.2" });' $BIND_OPTIONS