1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00

Merge pull request #109 from YunoHost-Apps/mongod-service

Properly remove service integration in Buster
This commit is contained in:
yalh76 2021-01-23 16:35:02 +01:00 committed by GitHub
commit f54631b241
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -335,11 +335,17 @@ 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
ynh_print_info --message="Removing MongoDB service..."
# Define Mongo Service Name
if [ "$(lsb_release --codename --short)" = "buster" ]; then
MONGODB_SERVICENAME=$MONGO_SERVICENAME_BUSTER
else
MONGODB_SERVICENAME=$MONGO_SERVICENAME_STRETCH
fi
# Remove the mongodb service
yunohost service remove $MONGODB_SERVICENAME
# ynh_secure_remove --file=$MONGO_ROOT_PWD_FILE
fi