Default property-file for Debian/Ubuntu (/etc/default/netxms-agent)

Started by Anders, February 01, 2014, 09:49:00 AM

Previous topic - Next topic

Anders

Hi,

I most often monitor Ubuntu Linux installations and tend to keep my: nxagentd.conf configuration file, scripts etc. under the path: /etc/netxms. By default the init-file for the netxms-agent looks for the configuration file under: /etc/nxagentd.conf.

I'd like to have a default property file under: /etc/default/netxms-agent (or /etc/default/nxagentd) where I can override startup options without having to modify the original init-file (/etc/init.d/nxagentd), specially as it gets overwritten every time there is a new release of the agent.

Thanks for a fantastic product!

Anders

Tatjana Dubrovica

Hi,

You can run nxagentd with -c <file> parameter: Use configuration file <file>.

Like:
nxagentd -c /etc/default/netxms-agent/nxagentd.conf

Anders

Hi Tatjana,

Thanks but it really doesn't solve my problem. I was looking for a way to override the executing parameters in the init-script without having to modify the actual init-script, simply because the /etc/init.d/nxagentd gets overwritten each time you upgrade the agent software (considering I have about 80 machines, that creates allot of undesirable work each upgrade).

But I think I've found a working solution to my problem. The great people developing NetXMS has used the standard debian/ubuntu init-script which automatically loads and overrides init-script variables from: /etc/default/nxagentd... so basically if anyone else has the same needs as me, they can simply execute the following command to get an parameter override that doesn't get overwritten:

echo "DAEMON_ARGS=\"-d -c /etc/netxms/nxagentd.conf\"" > /etc/default/nxagentd

I suppose this means that my feature request has already been fulfilled :)