#!/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 FS::cust_bill;
use FS::cust_pkg;
+$FREESIDE_LOG = "%%%FREESIDE_LOG%%%";
+$FREESIDE_LOCK = "%%%FREESIDE_LOCK%%%";
+
$Debug = 1; # 2 will turn on more logging
# 3 will log packet contents, including passwords
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
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();
-
my $conf = new FS::Conf;
my $clientd = "/usr/local/sbin/freeside-selfservice-clientd"; #better name?