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

Properly remove service integration in Buster

This commit is contained in:
tituspijean 2021-01-22 20:40:04 +01:00
parent 581db730b4
commit 5d450934d8

View file

@ -335,11 +335,17 @@ ynh_install_mongo() {
# #
# #
ynh_remove_mongo() { ynh_remove_mongo() {
ynh_print_info --message="Removing MongoDB..."
# Only remove the mongodb service if it is not installed. # Only remove the mongodb service if it is not installed.
if ! ynh_package_is_installed --package="mongodb*" if ! ynh_package_is_installed --package="mongodb*"
then 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 yunohost service remove $MONGODB_SERVICENAME
# ynh_secure_remove --file=$MONGO_ROOT_PWD_FILE # ynh_secure_remove --file=$MONGO_ROOT_PWD_FILE
fi fi