Hi there,
 
i have a problem with the NOTIFYCMD in the upsmon.conf file.
My line in the config looks like this:
 
NOTIFYCMD "/etc/nut/upsnotify.sh"
 
Now this ist my "/etc/nut/upsnotify.sh":
 
#!/bin/bash
EMAIL='[email protected]'
SMS1='+49123456789'
SMS2='+491987654231'
 
#eMail versenden
echo -e "Die USV mit dem Namen '$UPSNAME' hat seinen Status 
geändert!\n\nAktueller Status: '$NOTIFYTYPE'\n\nam `date +%d.%m.%Y` um `date 
+%H:%M` Uhr" |mail -s "[USV: $UPSNAME][STATUS] $NOTIFYTYPE am `date +%d.%m.%Y` 
um `date +%H:%M` Uhr" $EMAIL
 
#SMS versenden
echo -e "Die USV mit dem Namen '$UPSNAME' hat seinen Status 
geändert!\n\nAktueller Status: '$NOTIFYTYPE'\n\nam `date +%d.%m.%Y` um `date 
+%H:%M` Uhr" |gammu-smsd-inject -l TEXT $SMS1
echo -e "Die USV mit dem Namen '$UPSNAME' hat seinen Status 
geändert!\n\nAktueller Status: '$NOTIFYTYPE'\n\nam `date +%d.%m.%Y` um `date 
+%H:%M` Uhr" |gammu-smsd-inject -l TEXT $SMS2
 
when i execute the upsnotify.sh as root, then it works great. eMails and SMS 
are incoming.
But when i for e.g. pull out the ups from power, then there will be only emails 
and NO SMS. Why?
I can´t explain it.
NUT runs the script but not complete.
 
What can i do?
 
Thanks!
 
My System:
Raspberry Pi with the latest Raspbian, updates, firmware etc.
 
 
_______________________________________________
Mit freundlichen Grüßen
Stefan Fröchtenicht
Stadt Northeim
Systemadministrator - Informations- und Kommunikationsmanagement
Scharnhorstplatz 1
37154 Northeim
[email protected]
Tel +49  5551 966111
Fax +49 5551 966444
_______________________________________________
_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to