On Friday 24 May 2013 10:41 Jethro_uk wrote in uk.d-i-y:
> Stuck at the last stage of setting up my server, and that is getting the
> (Eaton NV400) UPS configured.
>
> Server is running Debian Wheezy. I have installed and configured NUT, and
> so far everything works. It connects to the USB port, reads the UPS, and
> reacts to a power off event.
>
> However, in my config, I want the following:
>
> Power cut: - send SMS, start 10 minute timer
> 10 minutes elapse:- shut down UPS (it has a 30 second grace period,
> allowing computer to shutdown); then:
> Shutdown PC.
>
> It's this last step that I can't make happen. I'm using the upssched
> module, and have put "/sbin/shutdown -h 0" in upssched.sh, but it's just
> being ignored. Tried googling, but nothing jumped out.
Is nut running as root (ps axu) ? shutdown cannot run as non root by
default. If I'm right then you need some /etc/sudoers magic to allow nut to
run shutdown with no password.
> In the NUT docs, it does seem to hint that the NUT system won't actually
> go to shutdown till the UPS sends a "battery low" signal. If this is the
> case, then I can live with it. However I don't really like the idea of
> pulling the plug and running down the battery to find out.
>
> All this is to avoid what happened when I *didn't* have any UPS software
> configured. We had a longish outage - the PC didn't shutdown, and the UPS
> battery doubled in size. I was lucky to be able to replace it.
--
Tim Watts Personal Blog:
http://squiddy.blog.dionic.net/
http://www.sensorly.com/ Crowd mapping of 2G/3G/4G mobile signal coverage
Reading this on the web? See:
http://wiki.diyfaq.org.uk/index.php?title=Usenet