From c9b85a8282671efefcc72b77a74ab5bd2c4c7a82 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 11 Jul 2022 21:37:55 +0800 Subject: [PATCH] Update install.sh --- plugins/mongodb/install.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/mongodb/install.sh b/plugins/mongodb/install.sh index a32aafef1..c94b2506a 100755 --- a/plugins/mongodb/install.sh +++ b/plugins/mongodb/install.sh @@ -41,10 +41,7 @@ if [ "$SYS_VERSION_ID" == "22" ]; then fi -if [ -f /usr/lib/systemd/system/mongod.service ];then - echo 'alreay exist!' - exit 0 -fi + echo $SYS_VERSION_ID @@ -78,7 +75,13 @@ apt install -y mongodb-org Uninstall_Linux_Ubuntu() { -systemctl stop mongod + +if [ -f /lib/systemd/system/mongod.service ] || [ -f /usr/lib/systemd/system/mongod.service ] ;then + systemctl stop mongod +fi + + + apt purge -y mongodb-org* apt autoremove -y rm -r /var/log/mongodb