On Mon, Apr 27, 2015 at 3:42 PM, James Hammond <
>
>
> #!/bin/sh
> case $1 in
> onbatt)
> /sbin/upsmon -c fsd;;
> *)
> echo "shutdown implemented";;
> esac
>
> root@unifi:/sbin# ./upssched-cmd.sh
> shutdown implemented
>
> root@unifi:/# upsmon -c fsd
> Network UPS Tools upsmon 2.7.3
>
>
>
I think you should pass $1 parameter to ./upssched-cmd.sh
# ./upssched-cmd.sh onbatt
The part of case should look like:
#!/bin/sh
case $1 in
onbatt)
/sbin/upsmon -c fsd
;;
*)
echo "shutdown implemented"
;;
esac
Also from upssched.conf:
AT ONBATT * EXECUTE powerout
So you need "powerout" instead of "onbatt" in your script.
--
Best / С наилучшими пожеланиями
*Pavel Potcheptsov*
LLC EKTOS-Ukraine
System administrator
1, Academika Proskury
Mobile UA: +38 050 3642391
Home UA: +380 572 931115
61070 Kharkiv
www.ektos.com.ua <http://www.ektos.net/>
E-mail:
[email protected]
Skype: potcheptsov.pavel
_______________________________________________
Nut-upsuser mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser