Merge branch 'ent-6970-deploy-script' into 'develop'

Ent 6970 deploy script

See merge request artica/pandorafms!3803
This commit is contained in:
Rafael Ameijeiras 2021-01-28 15:32:51 +01:00
commit 39c1c05022
1 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@ DBNAME=pandora
DBUSER=pandora
DBPASS=pandora
DBPORT=3306
S_VERSION='2021012801'
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
@ -101,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
@ -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"}'