Update INSTALL.sh

This commit is contained in:
Stefan Pejcic 2024-12-03 11:03:35 +01:00 committed by GitHub
parent 92826b0a40
commit 1c6c0f1d68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,12 +60,8 @@ OPENPANEL_ERR_DIR="/var/log/openpanel/" # https://
SERVICES_DIR="/etc/systemd/system/" # used for admin, sentinel and floatingip services SERVICES_DIR="/etc/systemd/system/" # used for admin, sentinel and floatingip services
CONFIG_FILE="${ETC_DIR}openpanel/conf/openpanel.config" # main config file for openpanel CONFIG_FILE="${ETC_DIR}openpanel/conf/openpanel.config" # main config file for openpanel
# Redirect output to the log file
exec > >(tee -a "$LOG_FILE") 2>&1 exec > >(tee -a "$LOG_FILE") 2>&1
# ====================================================================== # ======================================================================
# Helper functions that are not mandatory and should not be modified # Helper functions that are not mandatory and should not be modified
@ -157,14 +153,17 @@ radovan() {
} }
# if --debug flag then we print each command that is executed and display output on terminal.
# if debug flag is not provided, we simply run the command and hide all output by redirecting to /dev/null
debug_log() { debug_log() {
local timestamp
timestamp=$(date +'%Y-%m-%d %H:%M:%S')
if [ "$DEBUG" = true ]; then if [ "$DEBUG" = true ]; then
local timestamp=$(date +'%Y-%m-%d %H:%M:%S') # Show both on terminal and log file
echo "[$timestamp] $message" echo "[$timestamp] $message" | tee -a "$LOG_FILE"
"$@" "$@" 2>&1 | tee -a "$LOG_FILE"
else else
# No terminal output, only log file
echo "[$timestamp] COMMAND: $@" >> "$LOG_FILE"
"$@" > /dev/null 2>&1 "$@" > /dev/null 2>&1
fi fi
} }
@ -765,7 +764,7 @@ docker_compose_up(){
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
mkdir -p $DOCKER_CONFIG/cli-plugins mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.27.1/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose > /dev/null 2>&1 curl -SL https://github.com/docker/compose/releases/download/v2.27.1/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose > /dev/null 2>&1
chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose debug_log chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose
architecture=$(lscpu | grep Architecture | awk '{print $2}') architecture=$(lscpu | grep Architecture | awk '{print $2}')
@ -1554,6 +1553,7 @@ download_skeleton_directory_from_github(){
setup_bind(){ setup_bind(){
echo "Setting DNS service.." echo "Setting DNS service.."
mkdir -p /etc/bind/ mkdir -p /etc/bind/
chmod 777 /etc/bind/
cp -r /etc/openpanel/bind9/* /etc/bind/ cp -r /etc/openpanel/bind9/* /etc/bind/
# only on ubuntu systemd-resolved is installed # only on ubuntu systemd-resolved is installed
@ -1687,7 +1687,7 @@ support_message() {
echo "To get started, check out our Post Install Steps:" echo "To get started, check out our Post Install Steps:"
echo "👉 $DOCS_GET_STARTED_LINK" echo "👉 $DOCS_GET_STARTED_LINK"
echo "" echo ""
echo "Join our community and connect with us on::" echo "Join our community and connect with us on:"
echo " - Github: $GITHUB_LINK" echo " - Github: $GITHUB_LINK"
echo " - Discord: $DISCORD_INVITE_URL" echo " - Discord: $DISCORD_INVITE_URL"
echo " - Our community forums: $FORUMS_LINK" echo " - Our community forums: $FORUMS_LINK"