edit-config in unattended mode

I might have asked this before…?

Is there a way to invoke the edit-config script in an unattended manner?
I just want to invoke it so that the default (up-to-date, shipped) config files get laid down and then I’ll use automation to make changes to the files.

Hi @Luis_Johnstone . If you know which files you want to modify, you can copy them from the Netdata stock configuration directory to the user configuration directory. Your stock directory location depends on your installation path, and it is detected by the edit-config script in this way, if you’d like to do something similar:

  if [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}/usr/lib/netdata/conf.d" ]; then
  elif [ -n "${NETDATA_PREFIX}" ] && [ -d "${NETDATA_PREFIX}/lib/netdata/conf.d" ]; then
  elif [ -d "${script_dir}/../../usr/lib/netdata/conf.d" ]; then
  elif [ -d "${script_dir}/../../lib/netdata/conf.d" ]; then
  elif [ -d "/usr/lib/netdata/conf.d" ]; then

Let me know if that answers your question.

@Dim-P That looks perfect.
I think what I’ll do is, on config, pull a fresh copy of the relevant module .conf and the plugin .conf files from that directory to the install dir then edit those.

Thanks again!