Update INSTALL.sh

This commit is contained in:
Stefan Pejcic 2024-06-28 13:00:17 +02:00 committed by GitHub
parent f9dcdd3233
commit d0afb3445e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@
# Usage: cd /home && (curl -sSL https://get.openpanel.co || wget -O - https://get.openpanel.co) | bash # Usage: cd /home && (curl -sSL https://get.openpanel.co || wget -O - https://get.openpanel.co) | bash
# Author: Stefan Pejcic # Author: Stefan Pejcic
# Created: 11.07.2023 # Created: 11.07.2023
# Last Modified: 24.06.2024 # Last Modified: 28.06.2024
# Company: openpanel.co # Company: openpanel.co
# Copyright (c) OPENPANEL # Copyright (c) OPENPANEL
# #
@ -134,6 +134,17 @@ debug_log() {
fi fi
} }
# Check if a package is already installed
is_package_installed() {
if [ "$DEBUG" = false ]; then
$PACKAGE_MANAGER -qq list "$1" 2>/dev/null | grep -qE "^ii"
else
$PACKAGE_MANAGER -qq list "$1" | grep -qE "^ii"
echo "Updating package manager.."
fi
}
# Get server ipv4 from ip.openpanel.co # Get server ipv4 from ip.openpanel.co
current_ip=$(curl -s https://ip.openpanel.co || wget -qO- https://ip.openpanel.co) current_ip=$(curl -s https://ip.openpanel.co || wget -qO- https://ip.openpanel.co)