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
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
# ======================================================================
# 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() {
local timestamp
timestamp=$(date +'%Y-%m-%d %H:%M:%S')
if [ "$DEBUG" = true ]; then
local timestamp=$(date +'%Y-%m-%d %H:%M:%S')
echo "[$timestamp] $message"
"$@"
# Show both on terminal and log file
echo "[$timestamp] $message" | tee -a "$LOG_FILE"
"$@" 2>&1 | tee -a "$LOG_FILE"
else
# No terminal output, only log file
echo "[$timestamp] COMMAND: $@" >> "$LOG_FILE"
"$@" > /dev/null 2>&1
fi
}
@ -765,7 +764,7 @@ docker_compose_up(){
DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker}
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
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}')
@ -1554,6 +1553,7 @@ download_skeleton_directory_from_github(){
setup_bind(){
echo "Setting DNS service.."
mkdir -p /etc/bind/
chmod 777 /etc/bind/
cp -r /etc/openpanel/bind9/* /etc/bind/
# only on ubuntu systemd-resolved is installed
@ -1687,7 +1687,7 @@ support_message() {
echo "To get started, check out our Post Install Steps:"
echo "👉 $DOCS_GET_STARTED_LINK"
echo ""
echo "Join our community and connect with us on::"
echo "Join our community and connect with us on:"
echo " - Github: $GITHUB_LINK"
echo " - Discord: $DISCORD_INVITE_URL"
echo " - Our community forums: $FORUMS_LINK"