Skip to content

Commit

Permalink
Merge pull request #301 from mcbirse/main
Browse files Browse the repository at this point in the history
Remove option to set email sender name in pwstatus
  • Loading branch information
jasonacox authored Jun 13, 2023
2 parents f279e0b + dec4810 commit 51a3607
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions tools/pwstatus/pwstatus.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ SHAREFILES="YES"
# log file
LOGFILE="/var/log/pwstatus.log"

# e-mail alert sender name
FROM="Powerwall"

# e-mail alert recipient addresses
ALERTS="alerts@example.com"
ERRORS="errors@example.com"
Expand Down
8 changes: 1 addition & 7 deletions tools/pwstatus/pwstatus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ else
NO ) chmod 644 "$COOKIE" "$GRIDSTATUS" "$VERSION" > /dev/null 2>&1;;
esac

if [ -z "$FROM" ]
then
FROM="Powerwall"
fi

if [ -z "$SLEEP" ] || [ $SLEEP -lt 1 ]
then
SLEEP=5
Expand Down Expand Up @@ -245,7 +240,7 @@ send_alert()
"Message: $3" \
"Details: $4" )"

err="$( echo -e "$body" | mail -s "$2" "$1" -F "$FROM" 2>&1 )"
err="$( echo -e "$body" | mail -s "$2" "$1" 2>&1 )"
rv=$?

if [ $rv -ne 0 ]
Expand Down Expand Up @@ -515,7 +510,6 @@ log_msg " COOKIE = $COOKIE"
log_msg " GRIDSTATUS = $GRIDSTATUS"
log_msg " VERSION = $VERSION"
log_msg " SHAREFILES = $SHAREFILES"
log_msg " FROM = $FROM"
log_msg " ALERTS = $ALERTS"
log_msg " ERRORS = $ERRORS"
log_msg " SLEEP = $SLEEP"
Expand Down

0 comments on commit 51a3607

Please sign in to comment.