From ea9cea43bb4a5644340bc3c9710d0e5839757b6d Mon Sep 17 00:00:00 2001 From: Andy Witter Date: Fri, 6 Dec 2019 17:50:39 -0500 Subject: [PATCH] remove old stuff for pg and update interface handling --- templates/setup-head.sh | 15 +++++++-------- templates/setup.sh | 12 ++++++------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/templates/setup-head.sh b/templates/setup-head.sh index 97c3ab1..5ab6ffa 100755 --- a/templates/setup-head.sh +++ b/templates/setup-head.sh @@ -69,8 +69,9 @@ echo echo $(date) >> "$INSTALL_LOG" -Prep_DB_9_X () { #Prepare the database schema -/openils/bin/eg_db_config --service all --create-schema --create-offline --create-database \ +Prep_DB () { #Prepare the database schema +/openils/bin/eg_db_config --update-config \ + --service all --create-database --create-schema --create-offline \ --user EG_DB_USER --password EG_DB_PASSWORD --hostname MASTER_DB.CLUSTER_DOMAINNAME --port 5432 \ --database evergreen --admin-user EG_ADMIN_USER --admin-pass EG_ADMIN_PASS @@ -148,10 +149,7 @@ fi #FixAppArmorEJabberD GetNics ### Get the network interface #TODO change function called here from GetNic to GetNics - done - - ### Temporary create and alias interface for installation -GetNics if [ ! -z "${SECOND_PHYSICAL_INTERFACE}" ] then PRIMARY_INTERFACE="${SECOND_PHYSICAL_INTERFACE}" @@ -300,7 +298,8 @@ then then echo echo "Populating the database" - ifconfig eth0 Brick01_Head_IP netmask 255.255.255.0 + #ifconfig eth0 Brick01_Head_IP netmask 255.255.255.0 #TODO verify this still works + #ifconfig ${PRIMARY_INTERFACE} Brick01_Head_IP netmask 255.255.255.0 #TODO remove as we are setting this above. echo echo "Configuring database for Evergreen" echo @@ -316,12 +315,12 @@ then echo "the db setup script, rebooted, and running" read -p "THEN come back and press [Enter] to continue" chown -R opensrf:opensrf /openils - Prep_DB_9_X + Prep_DB else echo echo "Found db server MASTER_DB.CLUSTER_DOMAINNAME" chown -R opensrf:opensrf /openils - Prep_DB_9_X + Prep_DB fi fi fi diff --git a/templates/setup.sh b/templates/setup.sh index 9254a66..ad7e8ed 100755 --- a/templates/setup.sh +++ b/templates/setup.sh @@ -383,7 +383,7 @@ then if [ -e /etc/sysctl.d ] then echo - echo "Setting up database server" + echo "Setting up database server for Evergreen..." sleep 2 if [ "$PKG_SET" = "0" ] then @@ -399,12 +399,12 @@ then #echo "kernel.shmmax=17179869184" >> /etc/sysctl.d/evergreen_db.conf #TODO disabled for now #echo "kernel.shmall = 4194304" >> /etc/sysctl.d/evergreen_db.conf #TODO dislbed for now Install_DB_Deps - sed -i "s^#listen_addresses = 'localhost'^listen_addresses = '*'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf - sed -i "s^#log_destination = 'stderr'^log_destination = 'syslog'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf - sed -i "s^#syslog_facility = 'LOCAL0'^syslog_facility = 'LOCAL3'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf - sed -i "s^#syslog_ident = 'postgres'^syslog_ident = 'postgres'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf + #sed -i "s^#listen_addresses = 'localhost'^listen_addresses = '*'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf # moved to file in postgres conf.d + #sed -i "s^#log_destination = 'stderr'^log_destination = 'syslog'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf # same as above + #sed -i "s^#syslog_facility = 'LOCAL0'^syslog_facility = 'LOCAL3'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf # same as above + #sed -i "s^#syslog_ident = 'postgres'^syslog_ident = 'postgres'^g" /etc/postgresql/${PG_VER}/main/postgresql.conf # same as above #Init_DB_9 #TODO disabled. Now done the new way from the 1st brick head. - Add_EG_DB_User #TODO disabled same as above + #Add_EG_DB_User #TODO disabled same as above #if grep -q postgres /etc/passwd #then -- 2.11.0