Changeset 9672


Ignore:
Timestamp:
Sep 6, 2011, 1:35:36 PM (13 years ago)
Author:
rick
Message:

Proper rsync user/key determinitin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/import_scan_data.sh

    r9671 r9672  
    77MAP_CACHE=${MAP_CACHE:-"/usr/local/var/httpd/cache/maps"}
    88MANAGE="`dirname $0`/manage.py"
    9 SSH_USER=${SSH_USER:-$USER}
    109SSH_KEY="`dirname $0`/id_rsa"
    1110export PYTHON_EGG_CACHE=/tmp/
     
    2625echo "# rsync webfolder"
    2726if [ -r "$SSH_KEY" ]; then
    28   SSH_KEY_OPT='-i $SSH_KEY'
     27  SSH_KEY_OPT="-i $SSH_KEY"
     28  SSH_USER=backup
    2929else
    3030  echo "# warning automatic ssh key $SSH_KEY not readable"
    3131  SSH_KEY_OPT=''
     32  SSH_USER=${SSH_USER:-$SUDO_USER}
    3233fi
    33 rsync -az -e "ssh $SSH_KEY_OPT -l $SSH_USER -o StrictHostKeyChecking=no" tyan.wirelessleiden.nl:/usr/local/www/webfolder/scan-data/ $DATAROOT
     34echo rsync -az -e "ssh $SSH_KEY_OPT -l $SSH_USER -o StrictHostKeyChecking=no" tyan.wirelessleiden.nl:/usr/local/www/webfolder/scan-data/ $DATAROOT
    3435
    3536
Note: See TracChangeset for help on using the changeset viewer.