From: Chris Sharp Date: Wed, 6 Mar 2013 15:56:39 +0000 (-0500) Subject: adding utility to quickly switch reporter configs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d703ddbd05449445ed59db92e60867ba1a6471de;p=contrib%2Fpines.git adding utility to quickly switch reporter configs --- 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 + +