Changeset 29693 for trunk/base


Ignore:
Timestamp:
Oct 5, 2007, 8:10:00 PM (12 years ago)
Author:
jmpp@…
Message:

Switch to the sendmail mailer program and adapt the script to it, thus fixing a strange error when running the script off launchd by which the contents of the runlog file were not being piped to the mailer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/portmgr/PortIndex2MySQL.tcl

    r29618 r29693  
    6868set runlog_fd [open $runlog w+]
    6969set lockfile "/tmp/portsdb.lock"
    70 set mailprog "/usr/bin/mail"
     70set mailprog "/usr/sbin/sendmail"
    7171set DATE [clock format [clock seconds] -format "%A %Y-%m-%d at %T"]
    7272set subject "PortIndex2MySQL run failure on $DATE"
     
    8989        global subject SPAM_LOVERS mailprog
    9090        seek $runlog_fd 0 start
    91         exec -- $mailprog -s $subject $SPAM_LOVERS <@ $runlog_fd
     91        exec -- $mailprog $SPAM_LOVERS <@ $runlog_fd
    9292    }
    9393    cleanup runlog
     
    131131
    132132
     133# We first initialize the runlog with a proper mail subject:
     134puts $runlog_fd "Subject: $subject"
     135
    133136# Check if there are any stray sibling jobs before moving on, bail in such case.
    134137if {[file exists $lockfile]} {
Note: See TracChangeset for help on using the changeset viewer.