mirror of
https://github.com/YunoHost-Apps/dont-code_ynh.git
synced 2024-09-03 18:26:34 +02:00
Trying to understand why Mongo crashes in CI
This commit is contained in:
parent
1e231feae4
commit
2c6c98959e
2 changed files with 2 additions and 12 deletions
|
@ -123,19 +123,9 @@ ynh_install_java --java_version=$java_version --jdk_type=jre
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
ynh_print_info --message="Debian release is $(ynh_get_debian_release)"
|
|
||||||
|
|
||||||
# Install the required version of Mongo
|
# Install the required version of Mongo
|
||||||
ynh_install_mongo --mongo_version=$mongo_version
|
ynh_install_mongo --mongo_version=$mongo_version
|
||||||
|
|
||||||
# Try to get better error message from Mongo about why it doesn't start
|
|
||||||
ynh_exec_warn journalctl --quiet --no-hostname --no-pager --lines=100 --unit=mongod
|
|
||||||
log_path="/var/log/mongodb/mongod.log"
|
|
||||||
if [ -e "$log_path" ]; then
|
|
||||||
ynh_print_warn --message="\-\-\-"
|
|
||||||
ynh_exec_warn tail --lines=100 "$log_path"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
readonly YNH_DEFAULT_MONGO_VERSION=4.4
|
readonly YNH_DEFAULT_MONGO_VERSION=4.4
|
||||||
# Declare the actual MongoDB version to use: 4.4 ; 5.0
|
# Declare the actual MongoDB version to use: 4.4 ; 5.0 ; 6.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}
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ 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" --length=100
|
||||||
|
|
||||||
# Integrate MongoDB service in YunoHost
|
# Integrate MongoDB service in YunoHost
|
||||||
yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log"
|
yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log"
|
||||||
|
|
Loading…
Reference in a new issue