mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
Merge branch 'nodejs' into mongodb_auth
This commit is contained in:
commit
dbb39079a9
1 changed files with 5 additions and 4 deletions
|
@ -388,6 +388,8 @@ ynh_mongo_test_if_first_run() {
|
|||
#
|
||||
#
|
||||
ynh_install_mongo() {
|
||||
ynh_print_info --message="Installing MongoDB..."
|
||||
|
||||
# Define Mongo Service Name
|
||||
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
||||
ynh_install_extra_app_dependencies --repo="$MONGO_REPO_BUSTER" --package="$MONGO_DEPENDENCIES_BUSTER" --key="$MONGO_KEY_BUSTER"
|
||||
|
@ -400,13 +402,10 @@ ynh_install_mongo() {
|
|||
|
||||
# Make sure MongoDB is started and enabled
|
||||
systemctl is-enabled $MONGODB_SERVICENAME -q || systemctl enable $MONGODB_SERVICENAME --quiet
|
||||
systemctl is-active $MONGODB_SERVICENAME -q || ynh_systemd_action --service_name=$MONGODB_SERVICENAME --action=restart
|
||||
systemctl is-active $MONGODB_SERVICENAME -q || 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
|
||||
yunohost service add $MONGODB_SERVICENAME --description "MongoDB daemon" --log "/var/log/mongodb/$MONGODB_SERVICENAME.log"
|
||||
|
||||
# Waiting Mongo DB to be fully started
|
||||
sleep 10
|
||||
}
|
||||
|
||||
# Remove MongoDB
|
||||
|
@ -417,6 +416,8 @@ ynh_install_mongo() {
|
|||
#
|
||||
#
|
||||
ynh_remove_mongo() {
|
||||
ynh_print_info --message="Removing MongoDB..."
|
||||
|
||||
# Only remove the mongodb service if it is not installed.
|
||||
if ! ynh_package_is_installed --package="mongodb*"
|
||||
then
|
||||
|
|
Loading…
Add table
Reference in a new issue