Hello
I'm running a script via upssched

on a onbatt event, I want to sent a email, shutdown a windows server and 
shutdown an ubuntu server
When I run my script manually, all is ok but via upssched-cmd
it return "exec_cmd returned 255"

here is the script
#!/bin/bash
# send mail to admin
echo "ECO" | mail -s "ARRET SERVEURS NON PRIORITAIRES" m...@domaine.fr
net rpc shutdown -f -I ip_windows -U login%passwd
ssh login@ip_ubuntu sudo shutdown -h now

If I run only this cde
net rpc shutdown -f -I ip_windows -U login%passwd
it's ok

if I run only this cde
ssh login@ip_ubuntu sudo /sbin/shutdown -h now
I have returned 255

Is someone can help me
Thanks a lot



--


Sabine Goudard
Service Informatique et Multimédia
Tél : 04 77 42 37 20

Ecole Nationale Supérieure d’Architecture de Saint-Étienne
1, rue Buisson BP 94
42003 Saint-Étienne Cedex 1
Fax : 04 77 42 35 40
[http://www.st-etienne.archi.fr -> http://www.st-etienne.archi.fr]
_______________________________________________
Nut-upsuser mailing list
Nut-upsuser@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser

Reply via email to