From d703ddbd05449445ed59db92e60867ba1a6471de Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Wed, 6 Mar 2013 10:56:39 -0500 Subject: [PATCH] adding utility to quickly switch reporter configs --- switcheroo.sh | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) create mode 100755 switcheroo.sh diff --git a/switcheroo.sh b/switcheroo.sh new file mode 100755 index 0000000..616f100 --- /dev/null +++ b/switcheroo.sh @@ -0,0 +1,96 @@ +#!/bin/bash + +# (c) Copyright 2013 Georgia Public Library Service +# Chris Sharp $STATE_FILE +elif [ $CHOICE = "2" ]; then + echo "Selecting db02 configuration..." + cp -v $DB02_CONFIG $RUNNING_CONFIG + REPORTS_COUNT="8" + echo "Restarting services to activate new configuration..." + $OPENSRF_RESTART + StartReporter + echo "db02" > $STATE_FILE +elif [ $CHOICE = "3" ]; then + echo "Selecting db03 configuration..." + cp -v $DB03_CONFIG $RUNNING_CONFIG + REPORTS_COUNT="12" + echo "Restarting services to activate new configuration..." + $OPENSRF_RESTART + StartReporter + echo "db03" > $STATE_FILE +else + echo "Invalid response. Aborting." + exit; +fi + + -- 2.11.0