[freeside-commits] freeside/FS/bin freeside-selfservice-xmlrpcd, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Wed Jun 16 14:53:26 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv31147/FS/bin
Modified Files:
freeside-selfservice-xmlrpcd
Log Message:
a local XML-RPC server for ncic: daemonize and respond to TERM, RT#7780
Index: freeside-selfservice-xmlrpcd
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-selfservice-xmlrpcd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -d -r1.3 -r1.4
--- freeside-selfservice-xmlrpcd 16 Jun 2010 19:41:23 -0000 1.3
+++ freeside-selfservice-xmlrpcd 16 Jun 2010 21:53:24 -0000 1.4
@@ -25,6 +25,7 @@
use FS::Daemon qw(daemonize1 drop_root logfile daemonize2 );
use FS::UID qw(adminsuidsetup);
+use FS::Conf;
use FS::ClientAPI qw( load_clientapi_modules );
use FS::ClientAPI_XMLRPC; #FS::SelfService::XMLRPC;
@@ -47,18 +48,26 @@
my $user = shift or die &usage;
$FS::Daemon::NOSIG = 1;
-daemonize1('freeside-selfservice-xmlrpcd');
+$FS::Daemon::PID_NEWSTYLE = 1;
+daemonize1('selfservice-xmlrpcd');
POE::Kernel->has_forked(); #daemonize forks...
drop_root();
+adminsuidsetup($user);
+
load_clientapi_modules;
logfile("$FREESIDE_LOG/selfservice-xmlrpcd.log");
daemonize2();
+my $conf = new FS::Conf;
+
+die "not running; selfservice-xmlrpc conf option is off\n"
+ unless $conf->exists('selfservice-xmlrpc');
+
###
# the main loop
###
More information about the freeside-commits
mailing list