+unless ($DB::VERSION) {
+ $SIG{INT} = $SIG{TERM} = sub { $decease = 1 };
+}
+
+unless ($is_win) {
+ $SIG{HUP} = 'IGNORE';
+ $SIG{CHLD} = sub { $zombies++ };
+
+ $SIG{PIPE} = sub { dbg("Broken PIPE signal received"); };
+ $SIG{IO} = sub { dbg("SIGIO received"); };
+ $SIG{WINCH} = $SIG{STOP} = $SIG{CONT} = 'IGNORE';
+ $SIG{KILL} = 'DEFAULT'; # as if it matters....
+
+ # catch the rest with a hopeful message
+ for (keys %SIG) {
+ if (!$SIG{$_}) {
+ # dbg("Catching SIG $_") if isdbg('chan');
+ $SIG{$_} = sub { my $sig = shift; DXDebug::confess("Caught signal $sig"); };
+ }
+ }
+}
+
+# start dupe system
+DXDupe::init();
+
+# read in system messages
+DXM->init();
+
+# read in command aliases
+CmdAlias->init();
+
+# initialise the Geomagnetic data engine
+Geomag->init();
+WCY->init();
+
+# initial the Spot stuff
+Spot->init();
+
+# initialise the protocol engine
+dbg("reading in duplicate spot and WWV info ...");
+DXProt->init();
+
+# put in a DXCluster node for us here so we can add users and take them away
+$routeroot = Route::Node->new($mycall, $version*100+5300, Route::here($DXProt::me->here)|Route::conf($DXProt::me->conf));
+
+# make sure that there is a routing OUTPUT node default file
+#unless (Filter::read_in('route', 'node_default', 0)) {
+# my $dxcc = $DXProt::me->dxcc;
+# $Route::filterdef->cmd($DXProt::me, 'route', 'accept', "node_default call $mycall" );
+#}
+
+# read in any existing message headers and clean out old crap
+dbg("reading existing message headers ...");
+DXMsg->init();
+DXMsg::clean_old();
+
+# read in any cron jobs
+dbg("reading cron jobs ...");
+DXCron->init();
+
+# read in database descriptors
+dbg("reading database descriptors ...");
+DXDb::load();
+
+# starting local stuff
+dbg("doing local initialisation ...");
+eval {
+ Local::init();
+};
+dbg("Local::init error $@") if $@;
+
+dbg("cleaning out old debug files");
+DXDebug::dbgclean();
+
+# print various flags
+#dbg("seful info - \$^D: $^D \$^W: $^W \$^S: $^S \$^P: $^P");