From 7da866c1017520825d0586067d735196307ac1ac Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 8 Aug 2017 17:21:15 -0400 Subject: [PATCH] simple eg code deploy script Signed-off-by: Bill Erickson --- README | 8 -------- eg-quick-deploy.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 8 deletions(-) delete mode 100644 README create mode 100755 eg-quick-deploy.sh diff --git a/README b/README deleted file mode 100644 index 939ae5a7f..000000000 --- a/README +++ /dev/null @@ -1,8 +0,0 @@ -This repo is for putting random things in. - -You can push to it from your own repos without building off of the master branch, or anything else in it really. For example: - -git add random git@git.evergreen-ils.org:working/random -git push random local_branch:user/yourusername/local_branch - -Otherwise it follows the rules of working repos. diff --git a/eg-quick-deploy.sh b/eg-quick-deploy.sh new file mode 100755 index 000000000..bfd019e41 --- /dev/null +++ b/eg-quick-deploy.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# ------------------------------------------------------------------------- +# * Run as opensrf. +# * opensrf needs sudo +# ------------------------------------------------------------------------- +B=/home/opensrf +OSRF="$B/OpenSRF"; +ILS="$B/Evergreen"; +XUL_DIR=/openils/var/web/xul + +if [ $(whoami) != 'opensrf' ]; then + echo "$0 must be run as opensrf" + exit; +fi + +sudo systemctl stop apache2 +sudo apache2ctl-websockets stop # no systemd service file + +/openils/bin/osrf_control --localhost --fast-shutdown-all + +BID=$(date +"%FT%T"); +cd $ILS; +make && sudo make install STAFF_CLIENT_BUILD_ID=$BID \ + STAFF_CLIENT_VERISON=$BID STAFF_CLIENT_STAMP_ID=$BID; + +sudo chown -R opensrf:opensrf /openils + +# --------------------------------------------------- +# XUL client +# --------------------------------------------------- +rm -f $XUL_DIR/server; +rm -f $XUL_DIR/current; +cp -r "$ILS/Open-ILS/xul/staff_client/build" $XUL_DIR/ +cd $XUL_DIR; +mv build $BID; +ln -s $BID current; +ln -s current/server server +# --------------------------------------------------- + +sudo chown -R opensrf:opensrf $OSRF $ILS +/openils/bin/osrf_control --localhost --start-all +echo "Giving services a few seconds to start..." +sleep 10; +cd /openils/bin && ./autogen.sh ../conf/opensrf_core.xml; + +sudo systemctl start apache2 +sudo apache2ctl-websockets start; + -- 2.11.0