fn_emailtest 608 B

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