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:
parent
616cd4b291
commit
3a6050bf9a
1 changed files with 207 additions and 207 deletions
|
@ -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
|
||||||
#=================================================
|
#=================================================
|
Loading…
Reference in a new issue