# This is the ABC CGI setup on trillian.mit.edu:

# Make sure that our working directory  for  every  machine  is  one  of  the
# following:
	if    (-d ($d = '/home/jc/w/cgi/abc'))     {$homedir = $d}
	elsif (-d ($d = '/u/guests/jc/w/cgi/abc')) {$homedir = $d}
	else {print STDERR "$P: Can't find home directory.\n"; exit -1}

# Our machine's primary name:
	$fqdn = 'trillian.mit.edu' unless $fqdn;	# What to call this machine in URLs

# Some default values for error checking:
	$sendAddSite = 1;	# Send message asking for new URLs.
	$Vtest = 1;			# Debug level from test addresses
	$Vaddr = '207.172.223.184';	# Debug machine's current address
	$minreqdelay = 5;	# Min time between requests.
	$taintcheck = 0;	# Do extra taint checks

# The new HTML5 stuff:
	$H5 = 0;	# Should we include the HTML5 stuff yet?

# Some system files:
	$find_cmd = '/usr/bin/find';	# Which find command to use
	$rm_cmd   = '/bin/rm -f';			# Which rm command to use

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Load average params:

$ldavg = 0;		# Can't make it work here

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Load balancing params:
	$loadbalancing = 1;	# Should we do load balancing?
	%Load = (			# Key: host name; Val: portion of load
		'' => 10,		# Localhost
		'jc.tzo.net' => 0,
		'trillian.mit.edu' => 10, 
	);

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# We merge some hosts into a single host.  This is mostly for our own  files,
# which  are  currently  mirrored on several machines, some hidden.  This can
# also be used to handle the optional "www." pseudo-hostname.

%MapHost = (
	'ecf-guest.mit.edu' => 'trillian.mit.edu',
	'jc.tzo.net'  => 'trillian.mit.edu',
	'kendy'       => 'trillian.mit.edu',
	'minya'       => 'trillian.mit.edu',
	'localhost'   => 'trillian.mit.edu',
	'ibiblio.org' => 'www.ibiblio.org',
);

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# This is now defined in blacklist.pm, and should be the same for all systems.
#
#	$botpat = 		# Pattern to recognize bots in UA
#		'[-\w]*Google\w*|AhrefsBot|msnbot|BecomeBot|bingbot|Ezooms|Yahoo[-.\s\w]*|YandexBot|scirus-crawler|citeseer.*bot';

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - #
# Flags to control optional things:
	$sendcss    = 1;	# Should we send css stuff?
	$sendnotice = 1;	# Should we send the FT_notices_* file?
	$sendinfo   = 0;	# Should we send the FT_info_* file?
	$sendsites  = 1;	# Should we send the FT_sites_* file?
# 
# Controls for the "ads" box at the bottom of pages:
	$sendads     = 1;	# Should we send the ads box?
	$senddonate  = 1;	# Should we send a FT_*donate_* file?
	$sendsrch    = 1;	# Should we send a search widget?
	$google      = 0;	# Enable google stuff
	$googleads   = '';	# Google ad string
	$googlesrchs = '';	# Google search string
	$googleadsf  = '';	# 'FT_googleads.html';	# Google ads file
	$googlesrchf = 'FT_googlesrch.html';	# Google search file
	$PPdonatef   = 'FT_PPdonate.html';		# Paypal donate button file

# Finding our directory:
	$homedir = 		# Our home directory.
		'/u/guests/jc';
	$bindir = 		# Binaries for this machine
		"$homedir/bin";
	$lbindir = 		# Binaries for this machine
		'/usr/local/bin';
	$a2p = 			# Which abc2ps to use
		"$homedir/bin/jcabc2ps";
	
	$usrurl   = '/~jc';		# User id part of URLs.
	$webdir   = "$homedir/w"; 			# Where our web files are installed.
	$indexdir = "$webdir/music/ndx";	# Where to find the ABC index files.
	$botdir   = "$webdir/music/bot";    # Where to find the ABC search bot.
	$snmpdir  = "$webdir/snmp"; 		# Where SNMP stuff is installed here.
	$cgidir   = "$webdir/cgi/abc";		# Where CGI scripts are kept.
	$cgibin   = "$cgidir/trillian-bin"; # Localized binary executables
	$cgiurl   = "$usrurl/cgi/abc"; 		# Where to find CGI scripts.
	$docdir   = "$cgidir/doc";	     	# Where to find docs to send
	$musdir   = "$webdir/music";		# Our basic music directory
	$musurl   = "$usrurl/music";		# Our basic music directory
	$abcdir   = "$webdir/music/abc";	# Full path to ABC directory.
	$abcurl   = "$usrurl/music/abc";		# URL for ABC directory.

	%ABCdir = (		# Paths to various ABC directories.
		'500' => 'music/book/500',
		'abc' => 'music/abc',
		'bot' => 'music/bot',
		'contrib' => 'music/abc/contrib',
		'index' => 'music/ndx',
		'ndx' => 'music/ndx',
#		'ndx1' => 'music/ndx1',
		'oneills' => 'music/book/oneills',
		'playford' => 'music/book/playford',
#		'ryan-cole' => 'music/book/ryan-cole',
		'RJ' => 'music/book/RJ',
	);
	%ABCttl = (		# Titles for various ABC directories.
		'500' => '500 Tunes of the British Isles',
		'abc' => "JC's ABC Tune Archive",
		'bot' => "JC's ABC Web Bot",
		'contrib' => 'ABC Contributions',
		'index' => "JC's ABC index",
		'ndx' => "JC's ABC index",
#		'ndx1' => "JC's ABC index 1",
		'oneills' => "Online O'Neill's Collection",
		'playford' => 'Online Playford Collection',
#		'ryan-cole' => 'Online Ryan/Cole Collection',
		'RJ' => 'Roaring Jelly Collection',
	);
	push @INC, "$cgidir", "$cgidir/abc";
	$ENV{PATH} = "$cgibin:$cgidir:$bindir:$lbindir:$ENV{PATH}";
	$tmpdir =		# Where to put files.
		"$webdir/tmp";
	$tmpurl =		# Where to find tmp files.
		"$usrurl/tmp";
	push @INC, "$cgidir", "$cgidir/abc";
	$ENV{PATH} = "$cgidir:$cgidir/abc:$ENV{PATH}";
	use CGI_Lite;	# Required perl module.
	use CGI::Carp 'fatalsToBrowser';
1;
