#========================================================================#

# interchange.cfg

#========================================================================#
#

# Allows use of "ifdef @INDEV" below. Will set INDEV to 1 if file
# _indev is present.
Require module Vend::InDev

# These settings all affect other configuration directives below.

# Set to 1 to include back-end administration interface.
Variable  UI  1

# Set to "low", "high", or "rpc" to get different server parameters.
Variable  TRAFFIC  low

# Set to 1 to log extra debugging info and get a dump of global and
# catalog data structures.
#Variable  DEBUG  1

#========================================================================#

# Set up individual catalogs here.

Catalog  strap  /home/travis/catalogs/strap  /cgi-bin/strap

#========================================================================#

# Require an external module

# This one tests the realtime payment gateway code, set INDEV variable to test.
#
ifdef @INDEV
Require module Vend::Payment::TestPayment
endif

#========================================================================#

Environment  MOD_PERL

# Prevent arbitrary [file ...] and [include ...] among other things.
NoAbsolute Yes

#========================================================================#

ifdef @DEBUG

Message Sending debug messages to debug.log.
DebugFile debug.log

# A few simple tests ...
GlobalSub sub test_global_sub { return 'Test of global subroutine OK.' }
Variable  TEST_VARIABLE  Test of global variable OK.

# Dump global and catalog data structures to a text file at startup time.
# See {ConfDir}/interchange.structure and {CatRoot}/{CatName}.structure.
DumpStructure Yes

# This logs DBI calls to your DebugFile.
# It's commented out by default because it generates a lot of messages.
#DataTrace 1

endif

#========================================================================#

ifdef TRAFFIC =~ /low/i
Message Low traffic settings.
HouseKeeping 3
MaxServers   0
PIDcheck     300
endif

ifdef TRAFFIC =~ /high/i
Message High traffic settings.
HouseKeeping 2
MaxServers   0
PIDcheck     120
endif

ifdef TRAFFIC =~ /rpc/i
Message RPC traffic settings.
PreFork             Yes
StartServers        5
MaxServers          0
MaxRequestsPerChild 100
HouseKeeping        2
PIDcheck            120
endif

#========================================================================#

# Set this so cookies are issued only for the current catalog, not for
# the whole base domain.
Mall  Yes

# Additional Safe operations to untrap beyond the standard "ftfile sort".
SafeUntrap  rand

TcpMap 7786 -

# Include back office administration UI if variable set above.
ifdef UI
Message -i -n Calling UI...
include lib/UI/ui.cfg
endif

## This is only needed if you use Net::SMTP instead of
## sendmail or clones
#Variable MV_SMTPHOST smtp

# Include individual usertags.
include usertag/*.tag

# Include the robot recognition lists
include robots.cfg

# Include the list of country-specific standardised subdomains
include subdomains.cfg
