projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
realtime_bop: if a transaction fails without an error_message, output additional...
[freeside.git]
/
FS
/
bin
/
freeside-selfservice-server
diff --git
a/FS/bin/freeside-selfservice-server
b/FS/bin/freeside-selfservice-server
index
0ba97f6
..
205f1c3
100644
(file)
--- a/
FS/bin/freeside-selfservice-server
+++ b/
FS/bin/freeside-selfservice-server
@@
-1,6
+1,7
@@
#!/usr/bin/perl -w
use strict;
#!/usr/bin/perl -w
use strict;
+use vars qw( $FREESIDE_LOG $FREESIDE_LOCK );
use vars qw( $Debug %kids $kids $max_kids $ssh_pid %old_ssh_pid $keepalives );
use subs qw( lock_write unlock_write myshutdown usage );
use Fcntl qw(:flock);
use vars qw( $Debug %kids $kids $max_kids $ssh_pid %old_ssh_pid $keepalives );
use subs qw( lock_write unlock_write myshutdown usage );
use Fcntl qw(:flock);
@@
-15,8
+16,10
@@
use FS::UID qw(adminsuidsetup forksuidsetup);
use FS::ClientAPI;
use FS::Conf;
use FS::ClientAPI;
use FS::Conf;
-use FS::cust_bill;
-use FS::cust_pkg;
+use FS::cust_svc;
+
+$FREESIDE_LOG = "%%%FREESIDE_LOG%%%";
+$FREESIDE_LOCK = "%%%FREESIDE_LOCK%%%";
$Debug = 1; # 2 will turn on more logging
# 3 will log packet contents, including passwords
$Debug = 1; # 2 will turn on more logging
# 3 will log packet contents, including passwords
@@
-29,8
+32,7
@@
my $user = shift or die &usage;
my $machine = shift or die &usage;
my $tag = scalar(@ARGV) ? shift : '';
my $machine = shift or die &usage;
my $tag = scalar(@ARGV) ? shift : '';
-my $lock_file = "/usr/local/etc/freeside/selfservice.$machine.writelock";
-
+my $lock_file = "$FREESIDE_LOCK/selfservice.$machine.writelock";
# to keep pid files unique w/multi machines (and installs!)
# $FS::UID::datasrc not posible
# to keep pid files unique w/multi machines (and installs!)
# $FS::UID::datasrc not posible
@@
-50,12
+52,15
@@
$ENV{HOME} = (getpwuid($>))[7]; #for ssh
adminsuidsetup $user;
#logfile("/usr/local/etc/freeside/selfservice.". $FS::UID::datasrc); #MACHINE
adminsuidsetup $user;
#logfile("/usr/local/etc/freeside/selfservice.". $FS::UID::datasrc); #MACHINE
-logfile("
/usr/local/etc/freeside
/selfservice.$machine.log");
+logfile("
$FREESIDE_LOG
/selfservice.$machine.log");
daemonize2();
daemonize2();
-
my $conf = new FS::Conf;
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.
+}
my $clientd = "/usr/local/sbin/freeside-selfservice-clientd"; #better name?
my $clientd = "/usr/local/sbin/freeside-selfservice-clientd"; #better name?