Переглянути джерело

Try 4 to fix apparmor denied in syslog at Snap Candidate.

Thanks to webenefits and xet7 !

Fixes #4855
Lauri Ojansivu 8 місяців тому
батько
коміт
ecdfc68170
1 змінених файлів з 5 додано та 5 видалено
  1. 5 5
      snap-src/bin/mongodb-control

+ 5 - 5
snap-src/bin/mongodb-control

@@ -114,21 +114,21 @@ if [ -z "${MONGO_URL}" ]; then
     #echo "mongodb log destination: ${MONGO_LOG_DESTINATION}" >> "${SNAP_COMMON}/settings.log"
     #echo "mongodb log destination: ${MONGO_LOG_DESTINATION}" >> "${SNAP_COMMON}/settings.log"
 
 
     # Disable MongoDB telemetry and free monitoring
     # Disable MongoDB telemetry and free monitoring
-    mongosh wekan --eval 'disableTelemetry();' ${BIND_OPTIONS}
-    mongosh wekan --eval 'db.disableFreeMonitoring();' ${BIND_OPTIONS}
+    mongosh wekan --eval 'disableTelemetry();' --bind_ip ${MONGODB_BIND_IP} --port ${MONGODB_PORT}
+    mongosh wekan --eval 'db.disableFreeMonitoring();' --bind_ip ${MONGODB_BIND_IP} --port ${MONGODB_PORT}
 
 
     # Snap: Disable apparmor="DENIED" at syslog
     # Snap: Disable apparmor="DENIED" at syslog
     # https://github.com/wekan/wekan/issues/4855
     # https://github.com/wekan/wekan/issues/4855
-    mongosh wekan --eval 'db.adminCommand({ setParameter: 1, diagnosticDataCollectionEnabled: false});' ${BIND_OPTIONS}
+    mongosh wekan --eval 'db.adminCommand({ setParameter: 1, diagnosticDataCollectionEnabled: false});' --bind_ip ${MONGODB_BIND_IP} --port ${MONGODB_PORT}
 
 
     # Drop indexes on database upgrade, when starting MongoDB
     # Drop indexes on database upgrade, when starting MongoDB
     #mongosh wekan --eval "db.getCollectionNames().forEach(function(col_name) { var coll = db.getCollection(col_name); coll.dropIndexes(); });" $BIND_OPTIONS
     #mongosh wekan --eval "db.getCollectionNames().forEach(function(col_name) { var coll = db.getCollection(col_name); coll.dropIndexes(); });" $BIND_OPTIONS
 
 
     # Set MongoDB feature compatibility version
     # Set MongoDB feature compatibility version
-    mongosh wekan --eval 'db.adminCommand({ setFeatureCompatibilityVersion: "4.4" });' ${BIND_OPTIONS}
+    #mongosh wekan --eval 'db.adminCommand({ setFeatureCompatibilityVersion: "4.4" });' ${BIND_OPTIONS}
 
 
     # Delete incomplete uploads so that they would not prevent starting WeKan
     # Delete incomplete uploads so that they would not prevent starting WeKan
-    mongosh wekan --eval 'db.getCollection("cfs.attachments.filerecord").find( { "uploadedAt": { "$exists": true }, "copies.attachments" : null,"failures.copies.attachments.doneTrying" : {"$ne" : true}});' ${BIND_OPTIONS}
+    mongosh wekan --eval 'db.getCollection("cfs.attachments.filerecord").find( { "uploadedAt": { "$exists": true }, "copies.attachments" : null,"failures.copies.attachments.doneTrying" : {"$ne" : true}});' --bind_ip ${MONGODB_BIND_IP} --port ${MONGODB_PORT}
 
 
 else
 else