Compare commits

...

10 Commits

Author SHA1 Message Date
community-scripts-pr-app[bot]
e40de17874
Update CHANGELOG.md (#552)
Some checks are pending
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Deploy Next.js site to Pages / build (push) Waiting to run
Deploy Next.js site to Pages / deploy (push) Blocked by required conditions
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 20:40:24 +01:00
community-scripts-pr-app[bot]
e8719df21b
Update CHANGELOG.md (#544)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 20:25:56 +01:00
Håvard Gjøby Thom
257bccad6c
Update add-netbird-lxc.json (#545) 2024-11-27 16:11:01 +01:00
Håvard Gjøby Thom
4e66916ebc
Update zabbix.json (#543) 2024-11-27 16:07:34 +01:00
community-scripts-pr-app[bot]
1be91e9fad
Update CHANGELOG.md (#541)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 15:59:15 +01:00
community-scripts-pr-app[bot]
c098031a5a
Update CHANGELOG.md (#540)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-11-27 15:57:42 +01:00
CanbiZ
928a5cb9e5
Patch Netbird Script | Container Boot-Check | Debian/Ubuntu Only (#528)
* Update Add-Netbird

- Container Online-Check (Boot if LXC stopped)
- Alpine Check -> Abort if not Debian/Ubuntu

* Improve Netbird Json for website

* remove dev comments

* Change copyright
2024-11-27 15:54:44 +01:00
Dominik Siebel
9d72b5872a
fix: install mosquitto from mosquitto repo (#534) 2024-11-27 15:54:07 +01:00
DarmokNoob
60b9103a34
Install MongoDB 4.2 for non-AVX CPUs in Unifi LXC (#319)
* Put in check and alternative to install older Mongo for CPUs that can't support AVX

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/unifi.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/unifi.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/unifi.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Updated suggested changes

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update json/unifi.json

Updated Suggested Changes

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update install/unifi-install.sh

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update unifi.sh

* Update unifi.json

---------

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
2024-11-27 15:53:44 +01:00
CanbiZ
a2ae582992
Zabbix: Use Agent2 as Default | Update Script added | some other Improvements (#527)
* Improve Zabbix Update / Agent2

* Add Updateble / Documentation / Info for JSON

* Zabbix-Install: Switch to latest version & use zabbix-agent2

* Update json/zabbix.json

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>

* Update zabbix.sh

---------

Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
2024-11-27 15:52:53 +01:00
10 changed files with 119 additions and 34 deletions

View File

@ -16,6 +16,25 @@ All LXC instances created using this repository come pre-installed with Midnight
> [!IMPORTANT]
Do not break established syntax in this file, as it is automatically updated by a Github Workflow
## 2024-11-27
### Changed
### 💥 Breaking Changes
- Zabbix: Use Agent2 as Default | Update Script added | some other Improvements [@MickLesk](https://github.com/MickLesk) ([#527](https://github.com/community-scripts/ProxmoxVE/pull/527))
### 🚀 Updated Scripts
- Fix: install mosquitto from mosquitto repo [@dsiebel](https://github.com/dsiebel) ([#534](https://github.com/community-scripts/ProxmoxVE/pull/534))
- Patch Netbird Script | Container Boot-Check | Debian/Ubuntu Only [@MickLesk](https://github.com/MickLesk) ([#528](https://github.com/community-scripts/ProxmoxVE/pull/528))
- Install MongoDB 4.2 for non-AVX CPUs in Unifi LXC [@ColinOppenheim](https://github.com/ColinOppenheim) ([#319](https://github.com/community-scripts/ProxmoxVE/pull/319))
### 🌐 Website
- Fix json error in zabbix.json [@havardthom](https://github.com/havardthom) ([#543](https://github.com/community-scripts/ProxmoxVE/pull/543))
- Fix another json error in add-netbird-lxc.json [@havardthom](https://github.com/havardthom) ([#545](https://github.com/community-scripts/ProxmoxVE/pull/545))
## 2024-11-26
### Changed

View File

@ -17,10 +17,6 @@ cat <<"EOF"
EOF
}
header_info
if ! grep -q -m1 'avx[^ ]*' /proc/cpuinfo; then
echo "AVX instruction set is not supported on this CPU."
exit
fi
echo -e "Loading..."
APP="Unifi"
var_disk="8"

View File

@ -57,11 +57,32 @@ header_info
check_container_storage
check_container_resources
if [[ ! -f /etc/zabbix/zabbix_server.conf ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
msg_info "Stopping ${APP} Services"
systemctl stop zabbix-server zabbix-agent2
msg_ok "Stopped ${APP} Services"
msg_info "Updating $APP LXC"
mkdir -p /opt/zabbix-backup/
cp /etc/zabbix/zabbix_server.conf /opt/zabbix-backup/
cp /etc/apache2/conf-enabled/zabbix.conf /opt/zabbix-backup/
cp -R /usr/share/zabbix/ /opt/zabbix-backup/
cp -R /usr/share/zabbix-* /opt/zabbix-backup/
rm -Rf /etc/apt/sources.list.d/zabbix.list
cd /tmp
wget -q https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
dpkg -i zabbix-release_latest+debian12_all.deb &>/dev/null
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
systemctl restart zabbix-server
msg_ok "Updated $APP LXC"
apt-get install --only-upgrade zabbix-server-pgsql zabbix-frontend-php zabbix-agent2 zabbix-agent2-plugin-* &>/dev/null
msg_info "Starting ${APP} Services"
systemctl start zabbix-server zabbix-agent2
systemctl restart apache2
msg_ok "Started ${APP} Services"
msg_info "Cleaning Up"
rm -rf /tmp/zabbix-release_latest+debian12_all.deb
msg_ok "Cleaned"
msg_ok "Updated Successfully"
exit
}

View File

@ -21,6 +21,11 @@ $STD apt-get install -y gpg
msg_ok "Installed Dependencies"
msg_info "Installing Mosquitto MQTT Broker"
source /etc/os-release
curl -fsSL http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key >/usr/share/keyrings/mosquitto-repo.gpg.key
chmod go+r /usr/share/keyrings/mosquitto-repo.gpg.key
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/mosquitto-repo.gpg.key] http://repo.mosquitto.org/debian ${VERSION_CODENAME} main" >/etc/apt/sources.list.d/mosquitto.list
$STD apt-get update
$STD apt-get -y install mosquitto
$STD apt-get -y install mosquitto-clients
cat <<EOF >/etc/mosquitto/conf.d/default.conf

View File

@ -28,11 +28,25 @@ $STD apt-get update
$STD apt-get install -y temurin-17-jre
msg_ok "Installed Eclipse Temurin JRE"
msg_info "Installing MongoDB"
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list
$STD apt-get update
$STD apt-get install -y mongodb-org
if grep -q 'avx' /proc/cpuinfo; then
msg_ok "No AVX Support Detected"
msg_info "Installing MongoDB 4.2"
if ! dpkg -l | grep -q "libssl1.1"; then
wget -q http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb10u6_amd64.deb
$STD dpkg -i libssl1.1_1.1.1n-0+deb10u6_amd64.deb
$STD apt-get install -f -y # Fix any broken dependencies
fi
wget -qO- https://www.mongodb.org/static/pgp/server-4.2.asc | gpg --dearmor > /usr/share/keyrings/mongodb-server-4.2.gpg
echo "deb [signed-by=/usr/share/keyrings/mongodb-server-4.2.gpg] https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" >/etc/apt/sources.list.d/mongodb-org-4.2.list
$STD apt-get update
$STD apt-get install -y mongodb-org=4.2.17
else
msg_info "Installing MongoDB 7.0"
wget -qO- https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor >/usr/share/keyrings/mongodb-server-7.0.gpg
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" >/etc/apt/sources.list.d/mongodb-org-7.0.list
$STD apt-get update
$STD apt-get install -y mongodb-org
fi
msg_ok "Installed MongoDB"
msg_info "Installing UniFi Network Server"

View File

@ -14,17 +14,19 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apt-get install -y curl
$STD apt-get install -y sudo
$STD apt-get install -y mc
$STD apt-get install -y \
curl \
sudo \
mc
msg_ok "Installed Dependencies"
msg_info "Installing Zabbix"
wget -q https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-1+debian12_all.deb
$STD dpkg -i zabbix-release_7.0-1+debian12_all.deb
rm zabbix-release_7.0-1+debian12_all.deb
cd /tmp
wget -q https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
$STD dpkg -i /tmp/zabbix-release_latest+debian12_all.deb
$STD apt-get update
$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-agent
$STD apt-get install -y zabbix-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts
$STD apt-get install -y zabbix-agent2 zabbix-agent2-plugin-*
msg_ok "Installed Zabbix"
msg_info "Setting up PostgreSQL"
@ -50,14 +52,15 @@ echo -e "zabbix Database Name: \e[32m$DB_NAME\e[0m" >>~/zabbix.creds
msg_ok "Set up PostgreSQL"
msg_info "Starting Services"
systemctl restart zabbix-server zabbix-agent apache2
systemctl enable -q zabbix-server zabbix-agent apache2
systemctl restart zabbix-server zabbix-agent2 apache2
systemctl enable -q --now zabbix-server zabbix-agent2 apache2
msg_ok "Started Services"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /tmp/zabbix-release_latest+debian12_all.deb
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@ -33,11 +33,15 @@
"notes": [
{
"text": "After the script finishes, reboot the LXC then run `netbird up` in the LXC console",
"type": "warning"
"type": "info"
},
{
"text": "Execute within the Proxmox shell",
"text": "Execute within the Proxmox main shell",
"type": "info"
},
{
"text": "The script only works in Debian/Ubuntu, not in Alpine!",
"type": "warning"
}
]
}
}

View File

@ -32,8 +32,8 @@
},
"notes": [
{
"text": "CPU with AVX Instruction Set required",
"text": "For non-AVX CPUs, MongoDB 4.2 is installed. Please note this is a legacy solution that may present security risks and could become unsupported in future updates.",
"type": "warning"
}
]
}
}

View File

@ -6,10 +6,10 @@
],
"date_created": "2024-06-12",
"type": "ct",
"updateable": false,
"updateable": true,
"privileged": false,
"interface_port": "5454",
"documentation": null,
"interface_port": "",
"documentation": "https://www.zabbix.com/documentation/current/en/manual",
"website": "https://www.zabbix.com/",
"logo": "https://raw.githubusercontent.com/loganmarchione/homelab-svg-assets/main/assets/zabbix.svg",
"description": "Zabbix is an all-in-one monitoring solution with a variety of enterprise-grade features available right out of the box.",
@ -33,7 +33,11 @@
"notes": [
{
"text": "Database credentials: `cat zabbix.creds`",
"type": "warning"
"type": "info"
},
{
"text": "Zabbix agent 2 is used by default",
"type": "info"
}
]
}
}

View File

@ -2,6 +2,7 @@
# Copyright (c) 2021-2024 tteck
# Author: tteck (tteckster)
# Co-Author: MickLesk (Canbiz)
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
@ -10,9 +11,9 @@ clear
cat <<"EOF"
_ __ __ ____ _ __
/ | / /__ / /_/ __ )(_)________/ /
/ |/ / _ \/ __/ __ / / ___/ __ /
/ /| / __/ /_/ /_/ / / / / /_/ /
/_/ |_/\___/\__/_____/_/_/ \__,_/
/ |/ / _ \/ __/ __ / / ___/ __ /
/ /| / __/ /_/ /_/ / / / / /_/ /
/_/ |_/\___/\__/_____/_/_/ \__,_/
EOF
}
@ -28,6 +29,7 @@ while true; do
done
header_info
echo "Loading..."
function msg() {
local TEXT="$1"
echo -e "$TEXT"
@ -52,6 +54,23 @@ while [ -z "${CTID:+x}" ]; do
"${CTID_MENU[@]}" 3>&1 1>&2 2>&3) || exit
done
LXC_STATUS=$(pct status "$CTID" | awk '{print $2}')
if [[ "$LXC_STATUS" != "running" ]]; then
msg "\e[1;33m The container $CTID is not running. Starting it now...\e[0m"
pct start "$CTID"
while [[ "$(pct status "$CTID" | awk '{print $2}')" != "running" ]]; do
msg "\e[1;33m Waiting for the container to start...\e[0m"
sleep 2
done
msg "\e[1;32m Container $CTID is now running.\e[0m"
fi
DISTRO=$(pct exec "$CTID" -- cat /etc/os-release | grep -w "ID" | cut -d'=' -f2 | tr -d '"')
if [[ "$DISTRO" != "debian" && "$DISTRO" != "ubuntu" ]]; then
msg "\e[1;31m Error: This script only supports Debian or Ubuntu LXC containers. Detected: $DISTRO. Aborting...\e[0m"
exit 1
fi
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
cat <<EOF >>$CTID_CONFIG_PATH
lxc.cgroup2.devices.allow: c 10:200 rwm