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
#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}"
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
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
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
#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