small improvements in reboot script, added store_ping to database