source: trunk/cgi-bin/MyIPDB.pm@ 432

Last change on this file since 432 was 432, checked in by Kris Deugau, 14 years ago

/trunk

Clarify, clean up, and make sane configuration for database
host, db name, user, and password. See #17.

  • Property svn:keywords set to Date Rev Author
File size: 1.7 KB
Line 
1# ipdb/cgi-bin/MyIPDB.pm
2# Contains site-specific functions for IPDB
3# May override some functions from IPDB.pm, wraps others
4###
5# SVN revision info
6# $Date: 2010-07-16 21:31:13 +0000 (Fri, 16 Jul 2010) $
7# SVN revision $Rev: 432 $
8# Last update by $Author: kdeugau $
9###
10# Copyright (C) 2004-2010 - Kris Deugau
11
12# don't remove! required for GNU/FHS-ish install from tarball
13##uselib##
14
15use IPDB 2.0 qw(:ALL);
16
17
18# DSN, user, and password for database. These **MUST** be set.
19my $dbname = 'ipdb';
20my $dbuser = 'ipdb';
21my $dbpass = 'ipdbpwd';
22# DB host is optional.
23my $dbhost = 'ipdb-db';
24
25# Set some globals declared in IPDB.pm. Most of these only affect mailNotify().
26# Note that while you *can* leave these at defaults, it's probably a Really Bad Idea.
27#$IPDB::orgname = "Bob's Big Bonaza";
28#$IPDB::smtphost = '127.0.0.1';
29#$IPDB::domain = 'bob.com';
30#$IPDB::defcustid = '5554242';
31# Globals for db2rwhois.pl
32#$IPDB::rwhoisDataPath = '/usr/local/rwhoisd/etc/rwhoisd';
33#$IPDB::org_street = '123 4th Street';
34#$IPDB::org_city = 'Anytown';
35#$IPDB::org_prov_state = 'ON';
36#$IPDB::org_pocode = 'H0H 0H0';
37#$IPDB::org_country = 'CA';
38#$IPDB::org_phone = '000-555-1234';
39# note: following may also just be a bare email address
40#$IPDB::org_techhandle = 'ISP-ARIN-HANDLE';
41
42# Logging destination. Defaults to local2. See your local syslog docs for valid facilities.
43# Note that the value here should have the LOG_ prefix removed, and convert to lower-case.
44# local0 through local7 and user make the most sense.
45#$IPDB::syslog_facility = 'daemon';
46
47
48## connectDB_My()
49# Wrapper for IPDB::connectDB
50# Takes no arguments, returns whatever IPDB::connectDB returns.
51sub connectDB_My {
52 return connectDB($dbname, $dbuser, $dbpass, $dbhost);
53} # end connectDB_My()
54
55# Keep Perl from complaining.
561;
Note: See TracBrowser for help on using the repository browser.