[freeside-commits] freeside/FS/bin freeside-selfservice-xmlrpcd, 1.1.2.4, 1.1.2.5
Ivan,,,
ivan at wavetail.420.am
Wed Jun 16 14:53:23 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv31137/FS/bin
Modified Files:
Tag: FREESIDE_1_9_BRANCH
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.1.2.4
retrieving revision 1.1.2.5
diff -u -w -d -r1.1.2.4 -r1.1.2.5
--- freeside-selfservice-xmlrpcd 16 Jun 2010 19:41:24 -0000 1.1.2.4
+++ freeside-selfservice-xmlrpcd 16 Jun 2010 21:53:21 -0000 1.1.2.5
@@ -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