23 lines
410 B
Bash
Executable File
23 lines
410 B
Bash
Executable File
#!/bin/sh
|
|
|
|
minSize=50 #lines
|
|
dest=/usr/jails/webserver/usr/local/www/gutmet.org/freifunk/
|
|
destErrs=$dest
|
|
|
|
addrFile=Adressen.txt
|
|
errFile=Errors.txt
|
|
|
|
dir=`dirname $0`
|
|
cd $dir
|
|
stdbuf -oL -eL ./FFReverseGeo 2>> $errFile > $addrFile
|
|
|
|
size=`wc -l < $addrFile`
|
|
if [ "$size" -gt "$minSize" ]; then
|
|
cp $addrFile $dest
|
|
else
|
|
date >> $errFile
|
|
echo "Got weird size: $size" >> $errFile
|
|
fi
|
|
|
|
cp $errFile $destErrs
|