Ignore:
Timestamp:
07/16/10 17:31:13 (14 years ago)
Author:
Kris Deugau
Message:

/trunk

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/MyIPDB.pm

    r420 r432  
    1515use IPDB 2.0 qw(:ALL);
    1616
    17 ## connectDB_My()
    18 # Wrapper for IPDB::connectDB
    19 # Takes no arguments, returns whatever IPDB::connectDB returns.
    20 sub connectDB_My {
    21   return connectDB("ipdb", "ipdb", "ipdbpwd");
    22 } # end connectDB_My()
     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';
    2324
    2425# Set some globals declared in IPDB.pm.  Most of these only affect mailNotify().
     
    4445#$IPDB::syslog_facility = 'daemon';
    4546
     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
    4655# Keep Perl from complaining.
    47561;
Note: See TracChangeset for help on using the changeset viewer.