Change daily.sh to use db.pl (issue #253)