1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/overleaf_ynh.git synced 2024-09-03 19:56:27 +02:00

fix mongo helper

This commit is contained in:
Thomas 2024-05-05 09:32:21 +02:00 committed by GitHub
parent 616cd4b291
commit 3a6050bf9a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ nodejs_version=18.20.2
#================================================= #=================================================
readonly YNH_DEFAULT_MONGO_VERSION=7.0 readonly YNH_DEFAULT_MONGO_VERSION=7.0
# Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.0 # Declare the actual MongoDB version to use: 7.0 ; 8.0
# A packager willing to use another version of MongoDB can override the variable into its _common.sh. # A packager willing to use another version of MongoDB can override the variable into its _common.sh.
YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION} YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION}
@ -103,7 +103,7 @@ ynh_mongo_exec() {
database="" database=""
fi fi
mongo --quiet $user $password $authenticationdatabase $host $port <<EOF mongosh --quiet --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port <<EOF
$database $database
${command} ${command}
quit() quit()
@ -117,7 +117,7 @@ EOF
database="" database=""
fi fi
mongo --quiet $database $user $password $authenticationdatabase $host $port --eval="$command" mongosh --quiet $database --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port --eval="$command"
fi fi
} }
@ -356,7 +356,6 @@ ynh_install_mongo() {
# Make sure MongoDB is started and enabled # Make sure MongoDB is started and enabled
systemctl enable $mongodb_servicename --quiet systemctl enable $mongodb_servicename --quiet
systemctl daemon-reload --quiet systemctl daemon-reload --quiet
ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log" ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log"
# Integrate MongoDB service in YunoHost # Integrate MongoDB service in YunoHost
@ -386,6 +385,7 @@ ynh_remove_mongo() {
fi fi
} }
#================================================= #=================================================
# FUTURE OFFICIAL HELPERS # FUTURE OFFICIAL HELPERS
#================================================= #=================================================