diff --git a/plugins/mongodb/versions/4.4/centos.sh b/plugins/mongodb/versions/4.4/centos.sh index 111ec32e0..8a21a5f50 100644 --- a/plugins/mongodb/versions/4.4/centos.sh +++ b/plugins/mongodb/versions/4.4/centos.sh @@ -64,4 +64,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/4.4/debian.sh b/plugins/mongodb/versions/4.4/debian.sh index d1f79286f..c152ca1c8 100644 --- a/plugins/mongodb/versions/4.4/debian.sh +++ b/plugins/mongodb/versions/4.4/debian.sh @@ -41,4 +41,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/4.4/opensuse.sh b/plugins/mongodb/versions/4.4/opensuse.sh index ddb20a9fd..fdca6413f 100644 --- a/plugins/mongodb/versions/4.4/opensuse.sh +++ b/plugins/mongodb/versions/4.4/opensuse.sh @@ -44,4 +44,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} \ No newline at end of file diff --git a/plugins/mongodb/versions/4.4/rhel.sh b/plugins/mongodb/versions/4.4/rhel.sh index d9b69700d..c7366d83a 100644 --- a/plugins/mongodb/versions/4.4/rhel.sh +++ b/plugins/mongodb/versions/4.4/rhel.sh @@ -40,4 +40,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} \ No newline at end of file diff --git a/plugins/mongodb/versions/4.4/ubuntu.sh b/plugins/mongodb/versions/4.4/ubuntu.sh index 50dd9ec38..b799225ab 100644 --- a/plugins/mongodb/versions/4.4/ubuntu.sh +++ b/plugins/mongodb/versions/4.4/ubuntu.sh @@ -42,4 +42,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} \ No newline at end of file diff --git a/plugins/mongodb/versions/5.0/centos.sh b/plugins/mongodb/versions/5.0/centos.sh index ea86de93e..7ac9fe386 100644 --- a/plugins/mongodb/versions/5.0/centos.sh +++ b/plugins/mongodb/versions/5.0/centos.sh @@ -51,4 +51,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/5.0/debian.sh b/plugins/mongodb/versions/5.0/debian.sh index 27f363672..dda708022 100644 --- a/plugins/mongodb/versions/5.0/debian.sh +++ b/plugins/mongodb/versions/5.0/debian.sh @@ -41,4 +41,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/5.0/opensuse.sh b/plugins/mongodb/versions/5.0/opensuse.sh index 1ce13513e..a15a07f2b 100644 --- a/plugins/mongodb/versions/5.0/opensuse.sh +++ b/plugins/mongodb/versions/5.0/opensuse.sh @@ -44,4 +44,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/5.0/ubuntu.sh b/plugins/mongodb/versions/5.0/ubuntu.sh index a8cbe707b..95c7aa426 100644 --- a/plugins/mongodb/versions/5.0/ubuntu.sh +++ b/plugins/mongodb/versions/5.0/ubuntu.sh @@ -42,4 +42,7 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} + diff --git a/plugins/mongodb/versions/6.0/centos.sh b/plugins/mongodb/versions/6.0/centos.sh index a191ebc90..3e76956f4 100644 --- a/plugins/mongodb/versions/6.0/centos.sh +++ b/plugins/mongodb/versions/6.0/centos.sh @@ -57,4 +57,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +rm -rf ${MG_DIR}/${FILE_NAME} \ No newline at end of file diff --git a/plugins/mongodb/versions/6.0/debian.sh b/plugins/mongodb/versions/6.0/debian.sh index b5b720ae8..63f8525ea 100644 --- a/plugins/mongodb/versions/6.0/debian.sh +++ b/plugins/mongodb/versions/6.0/debian.sh @@ -41,4 +41,7 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} + diff --git a/plugins/mongodb/versions/6.0/opensuse.sh b/plugins/mongodb/versions/6.0/opensuse.sh index 47e4d8283..71323adac 100644 --- a/plugins/mongodb/versions/6.0/opensuse.sh +++ b/plugins/mongodb/versions/6.0/opensuse.sh @@ -44,4 +44,7 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} + diff --git a/plugins/mongodb/versions/6.0/ubuntu.sh b/plugins/mongodb/versions/6.0/ubuntu.sh index 34bad1622..0273e1816 100644 --- a/plugins/mongodb/versions/6.0/ubuntu.sh +++ b/plugins/mongodb/versions/6.0/ubuntu.sh @@ -42,4 +42,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/7.0/centos.sh b/plugins/mongodb/versions/7.0/centos.sh index cd3912edb..7475afac2 100644 --- a/plugins/mongodb/versions/7.0/centos.sh +++ b/plugins/mongodb/versions/7.0/centos.sh @@ -59,5 +59,5 @@ if [ ! -d $serverPath/mongodb/bin ];then cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb fi -rm -rf ${MG_DIR}/${FILE_NAME} +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/7.0/debian.sh b/plugins/mongodb/versions/7.0/debian.sh index a6a367db2..04db5b09a 100644 --- a/plugins/mongodb/versions/7.0/debian.sh +++ b/plugins/mongodb/versions/7.0/debian.sh @@ -43,5 +43,5 @@ if [ ! -d $serverPath/mongodb/bin ];then cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb fi -rm -rf ${MG_DIR}/${FILE_NAME} +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} diff --git a/plugins/mongodb/versions/7.0/opensuse.sh b/plugins/mongodb/versions/7.0/opensuse.sh index a4d805e00..4e88178f2 100644 --- a/plugins/mongodb/versions/7.0/opensuse.sh +++ b/plugins/mongodb/versions/7.0/opensuse.sh @@ -44,4 +44,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +cd ${MG_DIR} && rm -rf ${MG_DIR}/${FILE_NAME} \ No newline at end of file diff --git a/plugins/mongodb/versions/7.0/ubuntu.sh b/plugins/mongodb/versions/7.0/ubuntu.sh index 9a3412323..ac0e934e7 100644 --- a/plugins/mongodb/versions/7.0/ubuntu.sh +++ b/plugins/mongodb/versions/7.0/ubuntu.sh @@ -42,4 +42,6 @@ fi if [ ! -d $serverPath/mongodb/bin ];then mkdir -p $serverPath/mongodb cd $MG_DIR/${FILE_NAME} && cp -rf ./bin $serverPath/mongodb -fi \ No newline at end of file +fi + +rm -rf ${MG_DIR}/${FILE_NAME} \ No newline at end of file