object $sys: $root; var $root inited = 1; var $sys core_name = "Cold Turkey"; var $sys core_version = "0.0"; var $sys startup = #[['objects, [$login_daemon, $http_daemon]]]; public method .server_info() { arg what, @long; var tmp; switch (what) { case 'up_time: return time() - (startup['time]); case 'startup_time: return startup['time]; // case 'server_hostname: // return $dns.hostname(""); // case 'server_ip: // return $dns.ip(""); // case 'last_backup: // return backup['last]; case 'driver_version: tmp = .version(); return (((((((long ? "Cold Genesis " : "") + (tmp[1])) + ".") + (tmp [2])) + "p") + (tmp[3])) + "-") + ((listlen(tmp) == 3) ? "NEED TO UPGRADE" : (tmp[4])); case 'core_name: return core_name; case 'core_version: return core_name + ": " + core_version; default: throw(~unknown, "Unknown flag."); } }; driver method .signal() { arg [args]; }; driver method .startup() { arg args; var obj, hmm, l; set_heartbeat(0); startup = startup.add('time, time()); for obj in (startup['objects]) { catch any { dblog(("Calling " + (obj.objname())) + ".startup()"); (> obj.startup(@args) <); } with { dblog("" + traceback()); catch any { for l in ($parse_lib.traceback(traceback())) dblog(l); } with { dblog("" + traceback()); } } } set_heartbeat(5); };