Advertisement
Guest User

Untitled

a guest
Nov 30th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @task
  2. def mail_check():
  3. with hide('output','running','warnings'), settings(warn_only=True):
  4. result = run("ls /tmp/ | grep \"_lastmail_msmtp\"")
  5. if result != "":
  6. files = result.split()
  7. for file in files:
  8. with hide('output','running','warnings'), settings(warn_only=True):
  9. result = run("cat /tmp/"+file)
  10. if result == "/usr/sbin/sendmail: line 14: /usr/bin/msmtp: No such file or directory":
  11. print "MAIL MUSS RAUS"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement