Ignore:
Timestamp:
Dec 23, 2011, 9:16:20 AM (13 years ago)
Author:
rick
Message:

Importer fails if one file files, this makes it more reliable...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/django_gheat/import_scan_data.sh

    r9777 r9823  
    5959done
    6060
    61 #Kismet netxml Imports
    62 FILES="`find $DATAROOT -name '*netxml*' | sort`"
    63 [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES
    64 
    6561# Import all measure data
    6662for USERDIR in `find $DATAROOT -mindepth 1 -maxdepth 1 -type d | sort`; do
     
    7066    ARGS="-g $USERNAME -e $USERNAME@wirelessleiden.nl -k $DEVICE"
    7167
     68    echo "# INFO: Processing $USERNAME/$DEVICE"
    7269    # DroidStumber imports
    7370    FILES=`find $DEVICEDIR -name 'ScanResult-*'`
    74     [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES
     71    if [ -n "$FILES" ]; then
     72      $MANAGE import_datafile $ARGS $FILES
     73    fi
    7574
    76     #Kismet gpsxml Imports
     75    #Kismet Imports
    7776    FILES="`find $DEVICEDIR -name '*gpsxml*'`"
    78     [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES
     77    for GPSXML in $FILES; do
     78      NETXML=`echo $GPSXML | sed 's/gpsxml/netxml/g' `
     79      $MANAGE import_datafile $ARGS $NETXML $GPSXML
     80    done
    7981
    80     # Kismet imports
     82    # NetStumbler imports
    8183    FILES=`find $DEVICEDIR -name '*.ns1'`
    82     [ -n "$FILES" ] && $MANAGE import_datafile $ARGS $FILES
     84    if [ -n "$FILES" ]; then
     85      $MANAGE import_datafile $ARGS $FILES
     86    fi
    8387  done
    8488done
Note: See TracChangeset for help on using the changeset viewer.