Updated dbscript and fixed wattdaemon endline problem