Changeset 9690 for src


Ignore:
Timestamp:
Oct 4, 2011, 5:50:42 AM (13 years ago)
Author:
rick
Message:

Allow to run in autosync...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/import_scan_data.sh

    r9673 r9690  
    1111
    1212DATAROOT_CHOICES="$DATAROOT /usr/local/scan-data"
     13
     14DEBUG=${DEBUG:-false}
     15
     16debug() {
     17  $DEBUG && echo $*
     18}
     19
    1320if [ "$1" ]; then
    1421  DATAROOT=$1
     
    2027  done
    2128fi
    22 echo "# DATAROOT: $DATAROOT"
    23 echo "# SSH_USER: $SSH_USER"
     29debug "# DATAROOT: $DATAROOT"
     30debug "# SSH_USER: $SSH_USER"
    2431
    25 echo "# rsync webfolder"
     32echo "# rsync webfolder" 1>&2
    2633if [ -r "$SSH_KEY" ]; then
    2734  SSH_KEY_OPT="-i $SSH_KEY"
     
    3239  SSH_USER=${SSH_USER:-$SUDO_USER}
    3340fi
    34 echo rsync -avz -e "ssh $SSH_KEY_OPT -l $SSH_USER -o StrictHostKeyChecking=no" tyan.wirelessleiden.nl:/usr/local/www/webfolder/scan-data/ $DATAROOT
     41rsync -O --out-format="%n%L" -az -e "ssh $SSH_KEY_OPT -l $SSH_USER -o StrictHostKeyChecking=no" tyan.wirelessleiden.nl:/usr/local/www/webfolder/scan-data/ $DATAROOT
    3542
    3643
    37 echo "# unzip compressed .tar.gz files"
     44debug "# unzip compressed .tar.gz files"
    3845for FILE in `find $DATAROOT -name '*.tar.gz' | sort`; do
    3946  TARDIR=`dirname $FILE`
     
    4148done
    4249
    43 echo "# unzip compressed .zip files"
     50debug "# unzip compressed .zip files"
    4451for FILE in `find $DATAROOT -name '*.zip' | sort`; do
    4552  ARCHIVEDIR=`dirname $FILE`
    46   (cd $ARCHIVEDIR; unzip -n $FILE )
     53  (cd $ARCHIVEDIR; unzip -qn $FILE )
    4754done
    4855
     
    7380
    7481if [ -r $MAP_CACHE ]; then
    75   echo "# Clear cache $MAP_CACHE"
     82  debug "# Clear cache $MAP_CACHE"
    7683  htcacheclean -v -l10K -p$MAP_CACHE
    7784fi
Note: See TracChangeset for help on using the changeset viewer.