gdebi --n libmarc-charset-perl*.deb
gdebi --n libmarc-xml-perl*.deb
gdebi --n libnet-z3950-simple2zoom-perl*.deb
- echo
- echo "Installing Dependencies for Apache Web Sockets for web based staff client";sleep 2
+ echo
echo "installing ssl key and cert...";sleep 4 |
tar zxvf $WD/$TARCHIVE -C / etc/apache2/ssl/server.crt etc/apache2/ssl/server.key
- gdebi --n libapache2-mod-websocket*.deb
echo
- ### Configure Apache2 Web Sockets.
- echo "Setting up Apache Web Sockets for opensrf";sleep 2
- service apache2 stop;sleep 2
- sh /usr/share/doc/apache2/examples/setup-instance websockets
- if [ -e "$WD/websockets" ]
- then
- echo
- echo "Websockets found copying config files..."
- sleep 2
- # mkdir -p /etc/apache2/apache2-websockets
- # cp -f $WD/websockets/* /etc/apache2-websockets
-# cat <<EOF >> /etc/apache2-websockets/envvars
-
- ### For Opensrf
-# export OSRF_WEBSOCKET_IDLE_TIMEOUT=120
-# export OSRF_WEBSOCKET_IDLE_CHECK_INTERVAL=5
-# export OSRF_WEBSOCKET_CONFIG_FILE=/openils/conf/opensrf_core.xml
-# export OSRF_WEBSOCKET_CONFIG_CTXT=gateway
-# export OSRF_WEBSOCKET_MAX_REQUEST_WAIT_TIME=600
-#EOF
- fi
- a2dismod websocket
- update-rc.d apache2-websockets defaults
-
- echo
echo "Installing OpenSRF:";sleep 2
tar zxvf $WD/$TARCHIVE -C / etc/sudoers.d/opensrf
gdebi --n opensrf*.deb
- service apache2-websockets start
-
echo
echo "Installing Evergreen ILS:";sleep 2
gdebi --n evergreen-ils*.deb
## Munin on monitor servers.
if [ -e "$WD/Munin/munin-cron.crontab" ] ### This file only should exist on a monitoring server.
then
- if crontab -u munin "$WD/Munin/munin-cron.crontab"
- then
- sleep 2
- echo "Running munin-cron manually for first time."
- echo "This may take a while the first time..."
+ if crontab -u munin "$WD/Munin/munin-cron.crontab" then sleep 2 echo "Running munin-cron manually for first time." echo "This may take a while the first time..."
sudo su -c munin-cron --shell=/bin/bash munin
else
echo "Failed to install crontab for munin. Not running"
fi
}
+Add_PG_APT_Repo () {
+wget https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
+sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+}
+
Check_Netplan () { ### Check if we are using netplan
OS_VER="$(lsb_release -sr | awk -F"." '{ print $1 }')"
--shell /bin/bash --group --gecos "PostgreSQL administrator" --uid "$PG_UID" postgres
fi
fi
+ Add_PG_APT_Repo
$APT_TOOL update 2>&1 | tee -a $INSTALL_LOG
$APT_TOOL -y install $(cat tar_file_apt.list) 2>&1 | tee -a "$INSTALL_LOG"
fi
fi
}
+Add_PG_APT_Repo () {
+wget sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
+}
### Setup DB #and repoter
DBInstallErr () { ### DB install error.
sleep 2
if [ "$PKG_SET" = "0" ]
then
+ Add_PG_APT_Repo
$APT_TOOL update
$APT_TOOL -yq install postgresql-${PG_VER} postgresql-contrib-${PG_VER} postgresql-plperl-${PG_VER} postgresql-server-dev-${PG_VER} || DBInstallErr
else