[Pkg-nagios-changes] [SCM] UNNAMED PROJECT branch, master, updated. 016db4e7560fc8ef5ccdb6357745ef691650d94a

david hannequin david.hannequin at gmail.com
Wed Nov 16 10:03:33 UTC 2011


The following commit has been merged in the master branch:
commit 55e6bb50dc470cac4eccb2af8551ee47f23385f2
Author: david hannequin <david.hannequin at gmail.com>
Date:   Tue Nov 15 21:32:36 2011 +0100

    Add sender option

diff --git a/libexec/sendmailservice.py b/libexec/sendmailservice.py
index 62ed94b..43787f6 100644
--- a/libexec/sendmailservice.py
+++ b/libexec/sendmailservice.py
@@ -10,7 +10,7 @@ import smtplib
 
 def main():
     try:
-        opts, args = getopt.getopt(sys.argv[1:], "hnsHariot:v", ["help", "notification=", "servicedesc", "hostname", "hostaddress", "servicestate", "shortdatetime", "output", "to" ])
+        opts, args = getopt.getopt(sys.argv[1:], "hnsHariotS:v", ["help", "notification=", "servicedesc", "hostname", "hostaddress", "servicestate", "shortdatetime", "output", "to", "sender" ])
     except getopt.GetoptError, err:
         # print help information and exit:
         print str(err) 
@@ -40,6 +40,8 @@ def main():
             serviceoutput = a
         elif o in ("-t", "--to"):
             to = a
+        elif o in ("-S", "--sender"):
+            to = a
         else:
             assert False, "unhandled option"
 
@@ -54,6 +56,7 @@ def usage():
     print '-i --shortdatetime : date'
     print '-o --output : service output'
     print '-t --to : email send to'
+    print '-S --sender : email from'
 
 if __name__ == "__main__":
     main()

-- 
UNNAMED PROJECT



More information about the Pkg-nagios-changes mailing list