simple eg code deploy script
authorBill Erickson <berickxx@gmail.com>
Tue, 8 Aug 2017 21:21:15 +0000 (17:21 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 8 Aug 2017 21:22:13 +0000 (17:22 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
README [deleted file]
eg-quick-deploy.sh [new file with mode: 0755]

diff --git a/README b/README
deleted file mode 100644 (file)
index 939ae5a..0000000
--- 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 (executable)
index 0000000..bfd019e
--- /dev/null
@@ -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;
+