mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Snap: Disable apparmor="DENIED" in syslog.
Thanks to diegargon, webenefits and xet7 ! Fixes #4855
This commit is contained in:
parent
cf5312ed2e
commit
2048975e92
1 changed files with 14 additions and 3 deletions
|
@ -77,6 +77,13 @@ fi
|
|||
|
||||
if [ -z "$MONGO_URL" ]; then
|
||||
|
||||
# Disable MongoDB telemetry and free monitoring
|
||||
mongo --eval "disableTelemetry()"
|
||||
mongo --eval "db.disableFreeMonitoring()"
|
||||
# Snap: Disable apparmor="DENIED" at syslog
|
||||
# https://github.com/wekan/wekan/issues/4855
|
||||
mongo wekan --eval 'db.adminCommand({ setParameter: 1, diagnosticDataCollectionEnabled: false});' $BIND_OPTIONS
|
||||
|
||||
# start mongo deamon
|
||||
BIND_OPTIONS=""
|
||||
if [ "nill" != "$MONGODB_BIND_UNIX_SOCKET" ] && [ "x" != "x${MONGODB_BIND_UNIX_SOCKET}" ]; then
|
||||
|
@ -114,6 +121,13 @@ if [ -z "$MONGO_URL" ]; then
|
|||
|
||||
else
|
||||
|
||||
# Disable MongoDB telemetry and free monitoring
|
||||
mongo --eval "disableTelemetry()"
|
||||
mongo --eval "db.disableFreeMonitoring()"
|
||||
# Snap: Disable apparmor="DENIED" at syslog
|
||||
# https://github.com/wekan/wekan/issues/4855
|
||||
mongo wekan --eval 'db.adminCommand({ setParameter: 1, diagnosticDataCollectionEnabled: false});' $BIND_OPTIONS
|
||||
|
||||
if [ "syslog" == "${MONGO_LOG_DESTINATION}" ]; then
|
||||
echo "Sending mongodb logs to syslog"
|
||||
mongod --dbpath $SNAP_COMMON --syslog --journal $MONGO_URL --quiet
|
||||
|
@ -129,9 +143,6 @@ else
|
|||
mongod --dbpath $SNAP_COMMON --logpath /dev/null --journal $MONGO_URL --quiet
|
||||
fi
|
||||
|
||||
# Disable MongoDB telemetry and free monitoring
|
||||
mongo --eval "disableTelemetry()"
|
||||
mongo --eval "db.disableFreeMonitoring()"
|
||||
# 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue