From 01742670a508a5b6f9ac259347d69cb7a98f94bb Mon Sep 17 00:00:00 2001 From: rafael Date: Thu, 28 Jan 2021 15:28:05 +0100 Subject: [PATCH 1/2] adding localhost to condole config and adding versioning --- extras/deploy-scripts/pandora_deploy_community.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index 59cb3abef0..e05a5fe62e 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -12,6 +12,7 @@ DBNAME=pandora DBUSER=pandora DBPASS=pandora DBPORT=3306 +S_VERSION='v1.0' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" # Ansi color code variables @@ -87,6 +88,7 @@ check_root_permissions () { } ## Main +echo 'Starting PandoraFMS Community deployment $S_VERSION' # Centos Version if [ ! "$(grep -i centos /etc/redhat-release)" ]; then @@ -381,7 +383,7 @@ cat > $CONSOLE_PATH/include/config.php << EO_CONFIG_F \$config["dbname"]="$DBNAME"; \$config["dbuser"]="$DBUSER"; \$config["dbpass"]="$DBPASS"; -\$config["dbhost"]="$DBHOST"; +\$config["dbhost"]="localhost"; \$config["homedir"]="$PANDORA_CONSOLE"; \$config["homeurl"]="/pandora_console"; error_reporting(0); @@ -574,4 +576,4 @@ NONE='\033[0m' [ "$(curl -s ifconfig.me)" ] && ipplublic=$(curl -s ifconfig.me) printf " -> Go to Public ${green}http://"$ipplublic"/pandora_console${reset} to manage this server" -ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use this credentials to login in the console "g"[ User: admin / Password: pandora ]"n" \n"}' +ip addr | grep -w "inet" | grep -v "127.0.0.1" | grep -v -e "172.1[0-9].0.1" | awk '{print $2}' | awk -v g=$GREEN -v n=$NONE -F '/' '{printf "\n -> Go to Local "g"http://"$1"/pandora_console"n" to manage this server \n -> Use this credentials to login in the console "g"[ User: admin / Password: pandora ]"n" \n"}' \ No newline at end of file From a5c09bebd7e4d131204b9950e4feb9ec9d20b22d Mon Sep 17 00:00:00 2001 From: rafael Date: Thu, 28 Jan 2021 15:30:09 +0100 Subject: [PATCH 2/2] adding localhost to condole config and adding versioning --- extras/deploy-scripts/pandora_deploy_community.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/deploy-scripts/pandora_deploy_community.sh b/extras/deploy-scripts/pandora_deploy_community.sh index e05a5fe62e..8eec7eee9c 100644 --- a/extras/deploy-scripts/pandora_deploy_community.sh +++ b/extras/deploy-scripts/pandora_deploy_community.sh @@ -12,7 +12,7 @@ DBNAME=pandora DBUSER=pandora DBPASS=pandora DBPORT=3306 -S_VERSION='v1.0' +S_VERSION='2021012801' LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log" # Ansi color code variables @@ -103,7 +103,7 @@ echo -en "${cyan}Check Centos Version...${reset}" check_cmd_status 'Error OS version, Centos 7 is expected' # initialice logfile -execute_cmd "echo 'Starting deploy' > $LOGFILE" "All installer activity is logged on $LOGFILE" +execute_cmd "echo 'Starting community deployment #S_VERSION' > $LOGFILE" "All installer activity is logged on $LOGFILE" # Pre checks # Root permisions