[Nut-upsuser] upsd.conf - run as user option

Mike. the.lists at mgm51.com
Thu Jun 19 18:33:08 UTC 2014


On 6/19/2014 at 2:10 PM Mike. wrote:

|On 6/19/2014 at 9:03 AM Charles Lepple wrote:
|
||On Jun 18, 2014, at 1:51 PM, Mike. <the.lists at mgm51.com> wrote:
||
||> The upsmon.conf has the option of setting   RUN_AS_USER username 
||> 
||> Might it be possible to add a similar option to the upsd.conf
|file?
|| [snip]
||
||I hadn't noticed this until now, since most distributions tend to
|have a
||way to pass in options to their daemons (such as /etc/nut/nut.conf
|on
||Debian/Ubuntu). What we may want to do is add some comments to
|nut.conf
||for passing "-u user" in UPSD_OPTIONS. (It's in the man page for
|nut.conf,
||though.)
| =============
|
|Thanks for the quick reply.
|
|I'll give the nut.conf approach a try.  It does look as if it will
be
|the solution I need.
 =============


OK, it looks like the FreeBSD 10.0 port of NUT does not source
nut.conf in the nut startup script.

Based upon your comment, though, I was able to accomplish what I
needed by adding

	command_args="-u _ups"

under the line

	command="${nut_prefix}/sbin/upsd"


in /usr/local/etc/rc.d/nut which is the start/stop script for NUT.

Thanks again for your reply.

Mike.







More information about the Nut-upsuser mailing list