1 package FS::InitHandler;
3 # this leaks memory under graceful restarts and i wouldn't use it on any
4 # modern server. useful for very slow machines with memory to spare, just
5 # always do a full restart
9 use FS::UID qw(adminsuidsetup);
23 use HTML::Widgets::SelectLayers 0.02;
32 use FS::domain_record;
34 use FS::cust_bill_pay;
36 use FS::cust_credit_bill;
38 use FS::cust_main_county;
44 use FS::part_bill_event;
46 use FS::part_referral;
60 use FS::part_export_option;
64 warn "[FS::InitHandler] handler called\n" if $DEBUG;
66 #this is sure to be broken on freebsd
67 $> = $FS::UID::freeside_uid;
69 open(MAPSECRETS,"<$FS::UID::conf_dir/mapsecrets")
70 or die "can't read $FS::UID::conf_dir/mapsecrets: $!";
73 while (<MAPSECRETS>) {
76 or do { warn "strange line in mapsecrets: $_"; next; };
77 my($user, $datasrc) = ($1, $2);
78 next if $seen{$datasrc}++;
79 warn "[FS::InitHandler] preloading $datasrc for $user\n" if $DEBUG;
80 adminsuidsetup($user);
85 #lalala probably broken on freebsd