[Nut-upsuser] Besoin d’aide pour upssched

Roger Price roger at rogerprice.org
Tue Jun 14 13:08:47 UTC 2016


On Tue, 14 Jun 2016, Philippe Le Mesle wrote:

> Voici ma configuration :
> ******************************************************************
> 3/ le script /usr/bin/upssched-cmd
> #!/bin/bash
> case $1 in
> upssms)
> logger -t upssched-cmd "The UPS has been gone for 30 secs. Warn by sms..."
> /bin/echo "Power failed. System will hibernate soon..." | curl "command"
> ;;
...
> ups-back-on-power)
> logger -t upssched-cmd "The UPS power has been restored."
> /bin/echo "Power restored." | curl "command"
> ;;
...
> esac
>
> ******************************************************************
> Le problème que je rencontre est le suivant :
>
> quand je coupe l’électricité se coupe je ne reçois pas la notification 
> par SMS (via CURL) alors que je reçois la notification quand 
> l’électricité est rétablie.

Si je comprends bien, dans le cas ups-back-on-power, curl envoie un SMS, 
mais dans le cas upssms curl n'envoie rien.  Si ups-back-on-power marche, 
c'est que NUT marche correctement.  Alors il faut regarder de plus pres 
l'operation de curl.  Je suggere dans le cas upssms, ajouter -v à curl, et 
essayer la commande /usr/bin/upssched-cmd upssms manuellement sans passer 
par NUT.

(Try adding the -v option to curl in the case where it doesn't send an 
SMS, and run the command /usr/bin/upssched-cmd upssms manually)

Roger


More information about the Nut-upsuser mailing list