diff options
author | ivan <ivan> | 2006-12-15 00:28:46 +0000 |
---|---|---|
committer | ivan <ivan> | 2006-12-15 00:28:46 +0000 |
commit | 1163d4d5044ca487ae9cf2176346e297979aa1e1 (patch) | |
tree | a819c88eb837ea6349de06df955f9c19ecf88459 /FS | |
parent | 7422aa77086326ba1e6032150ce5704d1003ea6f (diff) |
tiny bit of cleanup from the conf merge
Diffstat (limited to 'FS')
-rw-r--r-- | FS/bin/freeside-addoutsource | 8 | ||||
-rw-r--r-- | FS/bin/freeside-deloutsource | 8 | ||||
-rw-r--r-- | FS/bin/freeside-queued | 2 | ||||
-rw-r--r-- | FS/bin/freeside-selfservice-server | 9 | ||||
-rw-r--r-- | FS/bin/freeside-sqlradius-radacctd | 2 |
5 files changed, 17 insertions, 12 deletions
diff --git a/FS/bin/freeside-addoutsource b/FS/bin/freeside-addoutsource index 8291c6434..9cb12195a 100644 --- a/FS/bin/freeside-addoutsource +++ b/FS/bin/freeside-addoutsource @@ -3,6 +3,8 @@ domain=$1 FREESIDE_CONF=%%%FREESIDE_CONF%%% +FREESIDE_CACHE=%%%FREESIDE_CACHE%%% +FREESIDE_EXPORT=%%%FREESIDE_EXPORT%%% #without this, [a-z]* matches CVS/, the copy doesn't return a sucessful error # status, and the rest of the commands aren't run @@ -24,7 +26,7 @@ chmod 600 $FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \ \ echo -e "DBI:Pg:dbname=$domain\nfreeside\n" >$FREESIDE_CONF/conf.DBI:Pg:dbname=$domain/secrets && \ \ -mkdir $FREESIDE_CONF/counters.DBI:Pg:dbname=$domain && \ -mkdir $FREESIDE_CONF/cache.DBI:Pg:dbname=$domain && \ -mkdir $FREESIDE_CONF/export.DBI:Pg:dbname=$domain +mkdir $FREESIDE_CACHE/counters.DBI:Pg:dbname=$domain && \ +mkdir $FREESIDE_CACHE/cache.DBI:Pg:dbname=$domain && \ +mkdir $FREESIDE_EXPORT/export.DBI:Pg:dbname=$domain diff --git a/FS/bin/freeside-deloutsource b/FS/bin/freeside-deloutsource index 72aca048f..afc3a0118 100644 --- a/FS/bin/freeside-deloutsource +++ b/FS/bin/freeside-deloutsource @@ -2,11 +2,13 @@ domain=$1 FREESIDE_CONF=%%%FREESIDE_CONF%%% +FREESIDE_CACHE=%%%FREESIDE_CACHE%%% +FREESIDE_EXPORT=%%%FREESIDE_EXPORT%%% dropdb $domain && \ rm -rf $FREESIDE_CONF/conf.DBI:Pg:host=localhost\;dbname=$domain && \ -rm -rf $FREESIDE_CONF/counters.DBI:Pg:host=localhost\;dbname=$domain && \ -rm -rf $FREESIDE_CONF/cache.DBI:Pg:host=localhost\;dbname=$domain && \ -rm -rf $FREESIDE_CONF/export.DBI:Pg:host=localhost\;dbname=$domain && \ +rm -rf $FREESIDE_CACHE/counters.DBI:Pg:host=localhost\;dbname=$domain && \ +rm -rf $FREESIDE_CACHE/cache.DBI:Pg:host=localhost\;dbname=$domain && \ +rm -rf $FREESIDE_EXPORT/export.DBI:Pg:host=localhost\;dbname=$domain && \ rm $FREESIDE_CONF/dbdef.DBI:Pg:host=localhost\;dbname=$domain diff --git a/FS/bin/freeside-queued b/FS/bin/freeside-queued index d16513bdd..93d735d1a 100644 --- a/FS/bin/freeside-queued +++ b/FS/bin/freeside-queued @@ -41,7 +41,7 @@ while ( $@ ) { } } -logfile( "%%%FREESIDE_CONF%%%/queuelog.". $FS::UID::datasrc ); +logfile( "%%%FREESIDE_LOG%%%/queuelog.". $FS::UID::datasrc ); warn "completing daemonization (detaching))\n" if $DEBUG; daemonize2(); diff --git a/FS/bin/freeside-selfservice-server b/FS/bin/freeside-selfservice-server index fc04ee91e..187bc1469 100644 --- a/FS/bin/freeside-selfservice-server +++ b/FS/bin/freeside-selfservice-server @@ -1,6 +1,7 @@ #!/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); @@ -18,7 +19,8 @@ use FS::Conf; use FS::cust_bill; use FS::cust_pkg; -$FREESIDE_CONF = "%%%FREESIDE_CONF%%%"; +$FREESIDE_LOG = "%%%FREESIDE_LOG%%%"; +$FREESIDE_LOCK = "%%%FREESIDE_LOCK%%%"; $Debug = 1; # 2 will turn on more logging # 3 will log packet contents, including passwords @@ -31,8 +33,7 @@ my $user = shift or die &usage; 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 @@ -52,7 +53,7 @@ $ENV{HOME} = (getpwuid($>))[7]; #for ssh adminsuidsetup $user; #logfile("/usr/local/etc/freeside/selfservice.". $FS::UID::datasrc); #MACHINE -logfile("$FREESIDE_SERVER/selfservice.$machine.log"); +logfile("$FREESIDE_LOG/selfservice.$machine.log"); daemonize2(); diff --git a/FS/bin/freeside-sqlradius-radacctd b/FS/bin/freeside-sqlradius-radacctd index bf415961c..83fd4bfd1 100644 --- a/FS/bin/freeside-sqlradius-radacctd +++ b/FS/bin/freeside-sqlradius-radacctd @@ -23,7 +23,7 @@ drop_root(); adminsuidsetup $user; -logfile( "%%%FREESIDE_CONF%%%/sqlradius-radacctd-log.". $FS::UID::datasrc ); +logfile( "%%%FREESIDE_LOG%%%/sqlradius-radacctd-log.". $FS::UID::datasrc ); daemonize2(); |