ba2de3c859cbc9ea7fa181641f191ba37bd14764
max
  Wed Mar 31 02:29:12 2021 -0700
updating blat servers table in gbic on every cgi update, refs #27301

diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh
index 889dfbd..62a9a42 100755
--- src/product/installer/browserSetup.sh
+++ src/product/installer/browserSetup.sh
@@ -1633,60 +1633,59 @@
    echo2 Creating or updating the BLAT servers table
    downloadFile http://$HGDOWNLOAD/admin/hgcentral.sql | $MYSQL hgcentral
    # the blat servers don't have fully qualified dom names in the download data
    $MYSQL hgcentral -e 'UPDATE blatServers SET host=CONCAT(host,".soe.ucsc.edu");'
 }
 
 function cgiUpdate ()
 {
    # update the CGIs
    $RSYNC -avzP --exclude=RNAplot --exclude=hg.conf --exclude=hg.conf.local --exclude=RNAplot $HGDOWNLOAD::cgi-bin/ $APACHEDIR/cgi-bin/ 
    # update the html docs
    echo2 Updating Apache htdocs
    $RSYNC -avzP --exclude=*.{bb,bam,bai,bw,gz,2bit,bed} --exclude=ENCODE --exclude=trash $HGDOWNLOAD::htdocs/ $APACHEDIR/htdocs/ 
    # assign all downloaded files to a valid user. 
    chown -R $APACHEUSER:$APACHEUSER $APACHEDIR/*
+   updateBlatServers
 }
 
 function updateBrowser {
-   cgiUpdate
    echo
+   cgiUpdate
 
    DBS=$*
    # if none specified, update all
    if [ "$DBS" == "" ] ; then
        DBS=`ls $GBDBDIR/`
    fi
 
    # update gbdb
    echo updating GBDB: $DBS
    for db in $DBS; do 
        echo2 syncing gbdb: $db
        rsync -avp $RSYNCOPTS $HGDOWNLOAD::gbdb/$db/ $GBDBDIR/$db/ 
    done
 
    # update the mysql DBs
    stopMysql
    DBS=`ls /var/lib/mysql/ | egrep -v '(Trash$)|(hgTemp)|(^ib_)|(^ibdata)|(^aria)|(^mysql)|(performance)|(.flag$)|(hgcentral)'`
    for db in $DBS; do 
        echo2 syncing full mysql database: $db
        $RSYNC --update --progress -avp $RSYNCOPTS $HGDOWNLOAD::mysql/$db/ $MYSQLDIR/$db/
    done
    startMysql
 
-   updateBlatServers
-    
    echo2 update finished
 }
 
 function addTools {
    rsync -avP hgdownload.soe.ucsc.edu::genome/admin/exe/linux.x86_64/ /usr/local/bin/
    echo2 The UCSC User Tools were copied to /usr/local/bin
    echo2 Please note that most of the tools require an .hg.conf file in the users
    echo2 home directory. A very minimal .hg.conf file can be found here:
    echo2 "http://genome-source.soe.ucsc.edu/gitlist/kent.git/blob/master/src/product/minimal.hg.conf"
 }
 
 # ------------ end of utility functions ----------------
 
 # -- START OF SCRIPT  --- MAIN ---