#! /bin/sh

logger -t "daily" -p 6 "Starting daily script"

#move daily db to main db

sqlite3 /var/tmp/daily ".dump dochazka" | grep INSERT | sqlite3 /sdcard/prst.db
/sdcard/statsgen
sqlite3 /var/tmp/daily "DELETE FROM dochazka WHERE 1"
today = `date -I` 
ftpput -u username -p password 192.168.1.3 $today /sdcard/prst.db