X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-selfservice-server;h=f008285e576b420848bf07ce31e5173c7755d68b;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hp=c10623c9688edb58e1683af50e226686cbe5eba1;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/FS/bin/freeside-selfservice-server b/FS/bin/freeside-selfservice-server index c10623c96..f008285e5 100644 --- a/FS/bin/freeside-selfservice-server +++ b/FS/bin/freeside-selfservice-server @@ -16,6 +16,7 @@ use FS::UID qw(adminsuidsetup forksuidsetup); use FS::ClientAPI qw( load_clientapi_modules ); use FS::ClientAPI_SessionCache; use FS::Record qw( qsearch qsearchs ); +use FS::TicketSystem; use FS::Conf; use FS::cust_svc; @@ -62,10 +63,15 @@ logfile("$FREESIDE_LOG/selfservice.$machine.log"); daemonize2(); my $conf = new FS::Conf; +my $ticket_system = $conf->config('ticket_system'); if ( $conf->exists('selfservice-ignore_quantity') ) { $FS::cust_svc::ignore_quantity = 1; $FS::cust_svc::ignore_quantity = 1; #now it is used twice. } +if ( $conf->exists('selfservice-db_profile') ) { + eval "use DBIx::Profile"; + warn $@ if $@; +} #clear the signup info cache so an "/etc/init.d/freeside restart" will pick #up new info... (better as a callback in Signup.pm?) @@ -108,31 +114,7 @@ while (1) { if ( $keepalives && $keepalive_count++ > 10 ) { $keepalive_count = 0; lock_write; - nstore_fd( { _token => '_keepalive' }, $writer ); - -#commenting izoom stuff out until we can move it to a branch (or just remove) -# foreach my $agent ( qsearch( 'agent', { disabled => '' } ) ) { -# my $config = qsearchs( 'conf', { name => 'selfservice-bulk_ftp_dir', -# agentnum => $agent->agentnum, -# } ) -# or next; -# -# my $session = -# FS::ClientAPI->dispatch( 'Agent/agent_login', -# { username => $agent->username, -# password => $agent->_password, -# } -# ); -# -# nstore_fd( { _token => '_ftp_scan', -# dir => $config->value, -# session_id => $session->{session_id}, -# }, -# $writer -# ); -# } - unlock_write; } next; @@ -181,12 +163,10 @@ while (1) { warn "child $pid spawned\n" if $Debug; } else { #kid time - ##get new db handle $FS::UID::dbh->{InactiveDestroy} = 1; forksuidsetup($user); - #get db handle - #adminsuidsetup($user); + FS::TicketSystem->init() if $ticket_system; my $type = $packet->{_packet}; warn "calling $type handler\n" if $Debug;