[Nut-upsuser] upssched setup

Pavel Potcheptsov (EKTOS) ppo at ektos.net
Thu May 7 07:21:02 UTC 2015


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 at unifi:/sbin# ./upssched-cmd.sh
> shutdown implemented
>
> root at 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:

ppo at ektos.net


  Skype:      potcheptsov.pavel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20150507/b738391a/attachment.html>


More information about the Nut-upsuser mailing list