From: Chris Sharp Date: Thu, 25 Jul 2019 18:12:37 +0000 (-0400) Subject: Separate deb installation functions for more granular install X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=40519e1412a50fec7cdf20695645c93ee439f4d3;p=contrib%2Fpines%2Fgenasys.git Separate deb installation functions for more granular install Add EG & OpenSRF Git installation functions. --- diff --git a/templates/setup-functions b/templates/setup-functions index 1229092..b8efadc 100755 --- a/templates/setup-functions +++ b/templates/setup-functions @@ -50,16 +50,16 @@ if [ "$OSDISTRO" == "Debian" ] ; then sleep 4 fi fi + ### install debs echo echo installing the debs now... #tar zxvf head_file.tar.gz -C /etc/apache2 etc/apache2/eg_vhost.conf -./debconf-settings && \ -rm debconf-settings && \ +#./debconf-settings && \ +#rm debconf-settings && \ cd debs && \ if $APT_TOOL update then - # gdebi --n opensrf*.deb echo echo "Installing Dependencies for Evergreen:";sleep 2 gdebi --n libclass-dbi*.deb @@ -67,7 +67,11 @@ if $APT_TOOL update gdebi --n libbusiness-stripe-perl*.deb gdebi --n libemail-send-perl*.deb gdebi --n libreturn-value-perl*.deb +fi +cd .. +} +InstallApacheWS () { echo echo "Installing Dependencies for Apache Web Sockets for web based staff client";sleep 2 echo "installing ssl key and cert...";sleep 4 | @@ -97,22 +101,52 @@ if $APT_TOOL update 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 +InstallOpenSRFandEGDebs () { +./debconf-settings && \ +rm debconf-settings && \ +cd debs && \ - service apache2-websockets start - - echo - echo "Installing Evergreen ILS:";sleep 2 - gdebi --n evergreen-ils*.deb -fi +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 cd .. chown -R opensrf:opensrf /openils } +InstallOpenSRFfromGit () { +OSRF_REPODIR=$(echo $OSRF_GIT_URL | awk -F/ '{print $NF}' | sed -e 's/.git%//') +DISTRONAME=ubuntu-xenial +useradd -m -s /bin/bash opensrf +su - opensrf -c git clone --branch $OSRF_GIT_BRANCH $OSRF_GIT_URL +cd $OSRF_REPODIR +make -f src/extras/Makefile.install $DISTRONAME +su - opensrf -c "cd $OSRF_REPODIR && autoreconf -i && ./configure --prefix=/openils --sysconfdir=/openils/conf && make" +make install +chown -R opensrf:opensrf /openils +} + +InstallEvergreenfromGit () { +EG_REPODIR=$(echo $EG_GIT_URL | awk -F/ '{print $NF}' | sed -e 's/.git%//') +DISTRONAME=ubuntu-xenial +su - opensrf -c git clone --branch $EG_GIT_BRANCH $EG_GIT_URL +cd $EG_REPODIR +make -f src/extras/Makefile.install $DISTRONAME +make -f src/extras/Makefile.install ${DISTRONAME}-developer +su - opensrf -c "cd $EG_REPODIR/Open-ILS/web/js/ui/default/staff && npm install && npm run build-prod && npm run test" +su - opensrf -c "cd $EG_REPODIR/Open-ILS/src/eg2 && npm install && ng build --prod && npm run test" +su - opensrf -c "cd $EG_REPODIR && autoreconf -i && ./configure --prefix=/openils --sysconfdir=/openils/conf && make" +make install +chown -R opensrf:opensrf /openils +} PG_Deps_Warning () { ### Dependency install error message echo