Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @task
- def mail_check():
- with hide('output','running','warnings'), settings(warn_only=True):
- result = run("ls /tmp/ | grep \"_lastmail_msmtp\"")
- if result != "":
- files = result.split()
- for file in files:
- with hide('output','running','warnings'), settings(warn_only=True):
- result = run("cat /tmp/"+file)
- if result == "/usr/sbin/sendmail: line 14: /usr/bin/msmtp: No such file or directory":
- print "MAIL MUSS RAUS"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement