JBAS-1437 Backstage processor -d db-host
authorBill Erickson <berickxx@gmail.com>
Thu, 12 Jan 2017 15:44:41 +0000 (10:44 -0500)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Make it easy to override the PGHOST parameter from within the Backstage
processor.  This way we don't have to modify and reset the value from
within CRON when we want to use a DB host that is not the system
default.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/authority-control/backstage/backstage-agent.sh

index b9fa3af..b069f94 100755 (executable)
@@ -221,6 +221,9 @@ function usage {
         $0
 
         Options
+            -d <db-host> - overrides global PGHOST for this script.
+                MAKE THIS THE FIRST SCRIPT PARAMETER IF SET.
+
             -a Import monthly authority update file.
 
             -b Create and upload quarterly bib export
@@ -232,8 +235,9 @@ USAGE
 }
 
 
-while getopts "abqh" opt; do
+while getopts "abqhd:" opt; do
     case $opt in
+        d) export PGHOST=$OPTARG;;
         a) bs_import_monthly_auths;;
         q) bs_import_qtrly_results;;
         b) bs_export_qtrly_bibs;;