Changeset 9777
- Timestamp:
- Dec 14, 2011, 4:51:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/django_gheat/import_scan_data.sh
r9690 r9777 37 37 echo "# warning automatic ssh key $SSH_KEY not readable" 38 38 SSH_KEY_OPT='' 39 SSH_USER=${SSH_USER:-$ SUDO_USER}39 SSH_USER=${SSH_USER:-${SUDO_USER:-$USER}} 40 40 fi 41 41 rsync -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 42 42 43 44 43 debug "# unzip compressed .tar.gz files" 45 44 for FILE in `find $DATAROOT -name '*.tar.gz' | sort`; do 46 TARDIR=`dirname $FILE` 47 tar -C $TARDIR -xkzf $FILE 45 TARDIR=`dirname $FILE`/`basename $FILE .tar.gz` 46 if [ ! -d $TARDIR ]; then 47 mkdir $TARDIR 48 tar -C $TARDIR -xvzf $FILE 49 fi 48 50 done 49 51 50 52 debug "# unzip compressed .zip files" 51 53 for FILE in `find $DATAROOT -name '*.zip' | sort`; do 52 ARCHIVEDIR=`dirname $FILE` 53 (cd $ARCHIVEDIR; unzip -qn $FILE ) 54 ARCHIVEDIR=`dirname $FILE`/`basename $FILE .zip` 55 if [ ! -d $ARCHIVEDIR ]; then 56 mkdir $ARCHIVEDIR 57 (cd $ARCHIVEDIR; unzip -qn $FILE ) 58 fi 54 59 done 55 60 … … 65 70 ARGS="-g $USERNAME -e $USERNAME@wirelessleiden.nl -k $DEVICE" 66 71 72 # DroidStumber imports 73 FILES=`find $DEVICEDIR -name 'ScanResult-*'` 74 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES 75 67 76 #Kismet gpsxml Imports 68 77 FILES="`find $DEVICEDIR -name '*gpsxml*'`" 69 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES70 71 # DroidStumber imports72 FILES=`find $DEVICEDIR -name 'ScanResult-*'`73 78 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES 74 79
Note:
See TracChangeset
for help on using the changeset viewer.