UPSDRVCTLSection: Network UPS Tools (NUT) (8)Updated: Sat Jan 31 2004 |
UPSDRVCTLSection: Network UPS Tools (NUT) (8)Updated: Sat Jan 31 2004 |
upsdrvctl [OPTIONS] {start | stop | shutdown} [ups]
upsdrvctl provides a uniform interface for controlling your UPS drivers. You should use upsdrvctl instead of direct calls to the drivers whenever possible.
When used properly, upsdrvctl lets you maintain identical startup scripts across multiple systems with different UPS configurations.
This may be set in the ups.conf with "chroot" in the global section.
If the driver is started as root without specifying this value, it will use the username that was compiled into the binary. This defaults to "nobody", and is far from ideal.
This may be set in ups.conf with "user" in the global section.
upsdrvctl supports three commands - start, stop and shutdown. They take an optional argument which is a UPS name from ups.conf(5). Without that argument, they operate on every UPS that is currently configured.
WARNING: this will probably power off your computers, so don't play around with this option. Only use it when your systems are prepared to lose power.
upsdrvctl will return a nonzero exit code if it encounters an error while performing the desired operation. This will also happen if a driver takes longer than the maxstartdelay period to enter the background.