Ignore:
Timestamp:
10/31/16 15:45:27 (8 years ago)
Author:
Kris Deugau
Message:

/trunk

Update FastCGI setup/call
Add nomail argument to add and update methods

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/ipdb-rpc.cgi

    r890 r891  
    9696my $reqcnt = 0;
    9797
     98my $req = FCGI::Request();
     99
    98100# main FCGI loop.
    99 while (FCGI::accept >= 0) {
     101while ($req->Accept() >= 0) {
    100102  # done here to a) prevent $ENV{'REMOTE_ADDR'} from being empty and b) to collect
    101103  # the right user for the individual call (since we may be running with FCGI)
     
    261263      mailNotify($ip_dbh, "a$args{type}", "ADDED: $disp_alloctypes{$args{type}} allocation",
    262264        "$disp_alloctypes{$args{type}} $msg allocated to customer $args{custid}\n".
    263         "Description: $args{desc}\n\nAllocated by: $args{rpcsystem}/$args{rpcuser}\n");
     265        "Description: $args{desc}\n\nAllocated by: $args{rpcsystem}/$args{rpcuser}\n")
     266        unless $args{nomail};
    264267    } else {
    265268      my $netblock = new NetAddr::IP $args{block};
    266269      mailNotify($ip_dbh, "a$args{type}", "ADDED: $disp_alloctypes{$args{type}} allocation",
    267270        "$disp_alloctypes{$args{type}} $args{block} allocated to customer $args{custid}\n".
    268         "Description: $args{desc}\n\nAllocated by: $args{rpcsystem}/$args{rpcuser}\n");
     271        "Description: $args{desc}\n\nAllocated by: $args{rpcsystem}/$args{rpcuser}\n")
     272        unless $args{nomail};
    269273    }
    270274    syslog "notice", "$args{rpcsystem}/$args{rpcuser} allocated '$args{block}' to '$args{custid}' as ".
     
    343347        "$disp_alloctypes{$blockinfo->{type}} $blockinfo->{block} deallocated by $authuser\n".
    344348        "CustID: $blockinfo->{custid}\nCity: $blockinfo->{city}\n".
    345         "Description: $blockinfo->{description}\n");
     349        "Description: $blockinfo->{description}\n")
     350        unless $args{nomail};
    346351  } else {
    347352    if ($args{type} =~ /^.i$/) {
Note: See TracChangeset for help on using the changeset viewer.