mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-04-29 09:23:08 +00:00
Add 8.0 for MongoDB Installation (#1046)
* Add 8.0 for MongoDB Installation * Add MongoDB Check
This commit is contained in:
parent
517b19a62b
commit
395d1086ea
@ -28,7 +28,7 @@ function update_script() {
|
|||||||
header_info
|
header_info
|
||||||
check_container_storage
|
check_container_storage
|
||||||
check_container_resources
|
check_container_resources
|
||||||
if [[ ! -f /etc/apt/sources.list.d/mongodb-org-7.0.list ]]; then
|
if [[ ! -f /etc/apt/sources.list.d/mongodb-org-7.0.list && ! -f /etc/apt/sources.list.d/mongodb-org-8.0.list ]]; then
|
||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
@ -44,4 +44,4 @@ build_container
|
|||||||
description
|
description
|
||||||
|
|
||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Copyright (c) 2021-2024 tteck
|
# Copyright (c) 2021-2024 tteck
|
||||||
@ -20,14 +21,22 @@ $STD apt-get install -y sudo
|
|||||||
$STD apt-get install -y mc
|
$STD apt-get install -y mc
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
msg_info "Installing MongoDB"
|
# Abfrage für die MongoDB-Version
|
||||||
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
|
read -p "Do you want to install MongoDB 8.0 instead of 7.0? [y/N]: " install_mongodb_8
|
||||||
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list
|
if [[ "$install_mongodb_8" =~ ^[Yy]$ ]]; then
|
||||||
|
MONGODB_VERSION="8.0"
|
||||||
|
else
|
||||||
|
MONGODB_VERSION="7.0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
msg_info "Installing MongoDB $MONGODB_VERSION"
|
||||||
|
wget -qO- https://www.mongodb.org/static/pgp/server-${MONGODB_VERSION}.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-${MONGODB_VERSION}.gpg] http://repo.mongodb.org/apt/debian $(grep '^VERSION_CODENAME=' /etc/os-release | cut -d'=' -f2)/mongodb-org/${MONGODB_VERSION} main" >/etc/apt/sources.list.d/mongodb-org-${MONGODB_VERSION}.list
|
||||||
$STD apt-get update
|
$STD apt-get update
|
||||||
$STD apt-get install -y mongodb-org
|
$STD apt-get install -y mongodb-org
|
||||||
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
|
sed -i 's/bindIp: 127.0.0.1/bindIp: 0.0.0.0/' /etc/mongod.conf
|
||||||
systemctl enable -q --now mongod.service
|
systemctl enable -q --now mongod.service
|
||||||
msg_ok "Installed MongoDB"
|
msg_ok "Installed MongoDB $MONGODB_VERSION"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
customize
|
customize
|
||||||
|
Loading…
x
Reference in New Issue
Block a user