Compare commits

...

12 Commits

Author SHA1 Message Date
CanbiZ
5f39bb66a5 Check mariaDB Installpath 2024-12-28 22:46:03 +01:00
community-scripts-pr-app[bot]
773b2fcc79 Update CHANGELOG.md (#1074)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-28 21:00:35 +01:00
CanbiZ
938f0f76fa Add Figlet into Repo | Creation of local ASCII Header (#1072)
* Add Figlet into Repo | Creation of local ASCII Header

* update develop > main
2024-12-28 20:59:16 +01:00
CanbiZ
611a14b55f Add Figlet into repo 2024-12-28 20:53:37 +01:00
community-scripts-pr-app[bot]
304db812a8 Update CHANGELOG.md (#1070)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-28 20:48:31 +01:00
CanbiZ
678206768c Zabbix: Fix SQL Path for 7.2 (#1069) 2024-12-28 20:47:50 +01:00
community-scripts-pr-app[bot]
92d2e421ee Update CHANGELOG.md (#1066)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-28 20:42:56 +01:00
CanbiZ
fe3ff916b6 Add MOTD IP Update (#1067) 2024-12-28 20:37:58 +01:00
Johanna Rührig
d4c95779bf Added missing port to access url (#1065) 2024-12-28 20:31:25 +01:00
community-scripts-pr-app[bot]
8c0794c2bb Update CHANGELOG.md (#1056) 2024-12-28 14:58:18 +01:00
CanbiZ
cdb121a55f fix url 2024-12-28 08:43:01 +01:00
CanbiZ
b22d66da1b fix url 2024-12-28 08:42:28 +01:00
7 changed files with 84 additions and 24 deletions

View File

@@ -16,6 +16,20 @@ All LXC instances created using this repository come pre-installed with Midnight
> [!IMPORTANT] > [!IMPORTANT]
Do not break established syntax in this file, as it is automatically updated by a Github Workflow Do not break established syntax in this file, as it is automatically updated by a Github Workflow
## 2024-12-28
### Changed
### 💥 Breaking Changes
- Add Figlet into Repo | Creation of local ASCII Header [@MickLesk](https://github.com/MickLesk) ([#1072](https://github.com/community-scripts/ProxmoxVE/pull/1072))
- Add an IP-Update for MOTD if IP Changed [@MickLesk](https://github.com/MickLesk) ([#1067](https://github.com/community-scripts/ProxmoxVE/pull/1067))
### 🚀 Updated Scripts
- Zabbix: Fix SQL Path for 7.2 [@MickLesk](https://github.com/MickLesk) ([#1069](https://github.com/community-scripts/ProxmoxVE/pull/1069))
- Authentik: added missing port to access url [@TheRealVira](https://github.com/TheRealVira) ([#1065](https://github.com/community-scripts/ProxmoxVE/pull/1065))
## 2024-12-27 ## 2024-12-27
### Changed ### Changed

View File

@@ -82,4 +82,4 @@ description
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}/if/flow/initial-setup/${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:9000/if/flow/initial-setup/${CL}"

View File

@@ -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/mariadb.list ]]; then if [[ ! -d /etc/mysql/mariadb.conf.d ]]; then
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi

View File

@@ -44,7 +44,7 @@ function update_script() {
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 rm -Rf /etc/apt/sources.list.d/zabbix.list
cd /tmp cd /tmp
wget -q https://repo.zabbix.com/zabbix/7.2/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb wget -q https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
dpkg -i zabbix-release_latest+debian12_all.deb &>/dev/null dpkg -i zabbix-release_latest+debian12_all.deb &>/dev/null
apt-get update &>/dev/null apt-get update &>/dev/null
apt-get install --only-upgrade zabbix-server-pgsql zabbix-frontend-php zabbix-agent2 zabbix-agent2-plugin-* &>/dev/null apt-get install --only-upgrade zabbix-server-pgsql zabbix-frontend-php zabbix-agent2 zabbix-agent2-plugin-* &>/dev/null

View File

@@ -22,7 +22,7 @@ msg_ok "Installed Dependencies"
msg_info "Installing Zabbix" msg_info "Installing Zabbix"
cd /tmp cd /tmp
wget -q https://repo.zabbix.com/zabbix/7.2/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb wget -q https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest+debian12_all.deb
$STD dpkg -i /tmp/zabbix-release_latest+debian12_all.deb $STD dpkg -i /tmp/zabbix-release_latest+debian12_all.deb
$STD apt-get update $STD apt-get update
$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-server-pgsql zabbix-frontend-php php8.2-pgsql zabbix-apache-conf zabbix-sql-scripts
@@ -39,7 +39,7 @@ $STD sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER $DB_USER ENCO
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET client_encoding TO 'utf8';"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET default_transaction_isolation TO 'read committed';"
$STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'" $STD sudo -u postgres psql -c "ALTER ROLE $DB_USER SET timezone TO 'UTC'"
zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null zcat /usr/share/zabbix/sql-scripts/postgresql/server.sql.gz | sudo -u $DB_USER psql $DB_NAME &>/dev/null
sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf sed -i "s/^DBName=.*/DBName=$DB_NAME/" /etc/zabbix/zabbix_server.conf
sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf sed -i "s/^DBUser=.*/DBUser=$DB_USER/" /etc/zabbix/zabbix_server.conf
sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf sed -i "s/^# DBPassword=.*/DBPassword=$DB_PASS/" /etc/zabbix/zabbix_server.conf

View File

@@ -157,30 +157,76 @@ arch_check() {
fi fi
} }
# Function to get the current IP address based on the distribution
get_current_ip() {
if [ -f /etc/os-release ]; then
# Check for Debian/Ubuntu (uses hostname -I)
if grep -qE 'ID=debian|ID=ubuntu' /etc/os-release; then
CURRENT_IP=$(hostname -I | awk '{print $1}')
# Check for Alpine (uses ip command)
elif grep -q 'ID=alpine' /etc/os-release; then
CURRENT_IP=$(ip -4 addr show eth0 | awk '/inet / {print $2}' | cut -d/ -f1 | head -n 1)
else
CURRENT_IP="Unknown"
fi
fi
echo "$CURRENT_IP"
}
# Function to update the IP address in the MOTD file
update_motd_ip() {
MOTD_FILE="/etc/motd"
if [ -f "$MOTD_FILE" ]; then
# Remove existing IP Address lines to prevent duplication
sed -i '/IP Address:/d' "$MOTD_FILE"
IP=$(get_current_ip)
# Add the new IP address
echo -e "${TAB}${NETWORK}${YW} IP Address: ${GN}${IP}${CL}" >> "$MOTD_FILE"
fi
}
# This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node. # This function sets the APP-Name into an ASCII Header in Slant, figlet needed on proxmox main node.
header_info() { header_info() {
if [ -f /etc/debian_version ]; then # Check if figlet is installed
# Debian/Ubuntu if ! command -v figlet &> /dev/null; then
if ! grep -q "^deb http://ftp.debian.org/debian bookworm main contrib" /etc/apt/sources.list; then echo -e "${INFO}${BOLD}${DGN}Figlet for ASCII-Header not found. Installing... ${CL}"
echo "deb http://ftp.debian.org/debian bookworm main contrib" >> /etc/apt/sources.list
# Install necessary dependencies and figlet
if [ -f /etc/debian_version ] || [ -f /etc/lsb-release ]; then
apt-get update -y &> /dev/null apt-get update -y &> /dev/null
fi apt-get install -y tar build-essential &> /dev/null
apt-get install -y figlet &> /dev/null
elif [ -f /etc/alpine-release ]; then elif [ -f /etc/alpine-release ]; then
# Alpine Linux apk add --no-cache tar build-base &> /dev/null
apk add --no-cache figlet ncurses &> /dev/null
export TERM=xterm export TERM=xterm
else else
echo "Unsupported OS"
return 1 return 1
fi fi
temp_dir=$(mktemp -d)
term_width=$(tput cols 2>/dev/null || echo 120) # Fallback to 120 columns curl -sL https://github.com/community-scripts/ProxmoxVE/raw/refs/heads/main/misc/figlet.tar.xz -o "$temp_dir/figlet.tar.xz"
mkdir -p /tmp/figlet
tar -xf "$temp_dir/figlet.tar.xz" -C /tmp/figlet --strip-components=1
cd /tmp/figlet
# Run make to compile the figlet binary
make >/dev/null
# Check if the figlet binary exists
if [ -f "figlet" ]; then
chmod +x figlet
# Move figlet to /usr/local/bin if not already there
if [ ! -e /usr/local/bin/figlet ]; then
mv figlet /usr/local/bin/
mkdir -p /usr/local/share/figlet
cp -r /tmp/figlet/fonts/*.flf /usr/local/share/figlet/
fi
echo -e "${CM}${BOLD}${DGN}Figlet successfully installed. ${CL}"
fi
rm -rf "$temp_dir"
fi
term_width=$(tput cols 2>/dev/null || echo 120)
ascii_art=$(figlet -f slant -w "$term_width" "$APP") ascii_art=$(figlet -f slant -w "$term_width" "$APP")
clear clear
cat <<EOF echo "$ascii_art"
$ascii_art
EOF
} }
# This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit. # This function checks if the script is running through SSH and prompts the user to confirm if they want to proceed or exit.

BIN
misc/figlet.tar.xz Normal file

Binary file not shown.