This commit was generated by cvs2svn to compensate for changes in r6252,
[freeside.git] / FS / bin / freeside-selfservice-server
index 187bc14..2087e71 100644 (file)
@@ -14,10 +14,10 @@ use Net::SSH qw(sshopen2);
 use FS::Daemon qw(daemonize1 drop_root logfile daemonize2 sigint sigterm);
 use FS::UID qw(adminsuidsetup forksuidsetup);
 use FS::ClientAPI;
+use FS::ClientAPI_SessionCache;
 
 use FS::Conf;
-use FS::cust_bill;
-use FS::cust_pkg;
+use FS::cust_svc;
 
 $FREESIDE_LOG = "%%%FREESIDE_LOG%%%";
 $FREESIDE_LOCK = "%%%FREESIDE_LOCK%%%";
@@ -58,6 +58,17 @@ logfile("$FREESIDE_LOG/selfservice.$machine.log");
 daemonize2();
 
 my $conf = new FS::Conf;
+if ( $conf->exists('selfservice-ignore_quantity') ) {
+  $FS::cust_svc::ignore_quantity = 1;
+  $FS::cust_svc::ignore_quantity = 1; #now it is used twice.
+}
+
+#clear the signup info cache so an "/etc/init.d/freeside restart" will pick
+#up new info... (better as a callback in Signup.pm?)
+my $cache = new FS::ClientAPI_SessionCache( {
+  'namespace' => 'FS::ClientAPI::Signup',
+} );
+$cache->remove('signup_info_cache');
 
 my $clientd = "/usr/local/sbin/freeside-selfservice-clientd"; #better name?