Comment rm mongo dir.

This commit is contained in:
BoHung Chiu 2023-01-05 14:21:57 +08:00
parent ae3b405f1c
commit 47cd16fca2
1 changed files with 4 additions and 4 deletions

View File

@ -178,8 +178,8 @@ else
#if mongo 6 core dump, then install mongo 5 #if mongo 6 core dump, then install mongo 5
if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then
sudo apt-get purge mongodb-org* -y sudo apt-get purge mongodb-org* -y
sudo rm -rf /var/log/mongodb # sudo rm -rf /var/log/mongodb
sudo rm -rf /var/lib/mongodb # sudo rm -rf /var/lib/mongodb
apt_add_key_func https://www.mongodb.org/static/pgp/server-5.0.asc apt_add_key_func https://www.mongodb.org/static/pgp/server-5.0.asc
# install mongod 5.0 # install mongod 5.0
if [[ $ubuntu_version > '20' ]]; then if [[ $ubuntu_version > '20' ]]; then
@ -212,8 +212,8 @@ else
#if mongo 5 core dump, then install mongo 4.4 #if mongo 5 core dump, then install mongo 4.4
if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then if [ $exit_code != 0 ] && [ $exit_code != 1 ]; then
sudo apt-get purge mongodb-org* -y sudo apt-get purge mongodb-org* -y
sudo rm -rf /var/log/mongodb # sudo rm -rf /var/log/mongodb
sudo rm -rf /var/lib/mongodb # sudo rm -rf /var/lib/mongodb
apt_add_key_func https://www.mongodb.org/static/pgp/server-4.4.asc apt_add_key_func https://www.mongodb.org/static/pgp/server-4.4.asc
if [[ $ubuntu_version > '20' ]]; then if [[ $ubuntu_version > '20' ]]; then
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list