<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 6, 2016, at 6:15 AM, Stefan Fröchtenicht wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">when i execute the upsnotify.sh as root, then it works great. eMails and SMS are incoming.<o:p class=""></o:p></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">But when i for e.g. pull out the ups from power, then there will be only emails and NO SMS. Why?<o:p class=""></o:p></div><br class="Apple-interchange-newline"></div></blockquote></div>NUT runs the notify script as the "nut" user on many systems, including Debian. Check to see if $PATH is set the same, and that the nut user has privileges to run the SMS program.<div class=""><br class=""></div><div class="">You could also try temporarily wrapping the SMS portion in a subshell that pipes stdout/stderr to mail (or a file):</div><div class=""><br class=""></div><div class="">( echo "..." | gammu-smsd-inject ... ) 2>&1 | mail -s "errors from SMS" $EMAIL</div></body></html>