diff options
author | Brett Weiland <techcrazybsw@gmail.com> | 2020-10-15 09:00:37 -0500 |
---|---|---|
committer | Brett Weiland <techcrazybsw@gmail.com> | 2020-10-15 09:00:37 -0500 |
commit | 267d18b483d62ff5a9b65660287e7f0d88035d19 (patch) | |
tree | 0b884c7d435a35a8f73c4d266d1f45274a92d947 |
-rwxr-xr-x | ewd | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +#!/bin/bash +pass="no_fuck_YOUR_chicken_strips_you_whore" +email_to="19132286776@messaging.sprintpcs.com" +$@ +return_code=$? +echo "Command has completed. Now notifying..." +if [ $return_code -eq 0 ]; then + ssmtp $email_to -ap $pass << EOF +To: $email_to +From: bpc_courier@bpcspace.com +The command "$@" completed successfully. Congrats. +EOF +else + ssmtp $email_to -ap $pass << EOF +To: $email_to +From: bpc_courier@bpcspace.com +The command "$@" has failed with error code $return_code. Sorry... :( +EOF +fi |