fn_emailtest 566 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # LGSM fn_emailtest function
  3. # Author: Daniel Gibbs
  4. # Website: http://danielgibbs.co.uk
  5. # Version: 011214
  6. fn_rootcheck
  7. fn_syscheck
  8. fn_scriptlog "Emailing test notification"
  9. if [ "${emailnotification}" = "on" ]; then
  10. subject="${servicename} Email Test Notification - Testing ${servername}"
  11. failurereason="Testing ${servicename} email notification"
  12. actiontaken="Sent test email...hello is this thing on?"
  13. fn_emailnotification
  14. else
  15. fn_printfailnl "Email notification not enabled"
  16. fn_scriptlog "Email notification not enabled"
  17. fi
  18. sleep 1
  19. echo -en "\n"