nextdns icon indicating copy to clipboard operation
nextdns copied to clipboard

command to remove "conditional config" from config file

Open osayb opened this issue 5 years ago • 13 comments

is there note/help specifically stating how to remove conditional config? I'm looking for ways to remove "00:1c:42:2e:60:4a=67890" line from the config file using Nextdns client.

osayb avatar Jun 04 '20 09:06 osayb

We need to add a config del, for now you have to edit the file manually.

rs avatar Jun 04 '20 17:06 rs

OK, then I'll manually remove it.

osayb avatar Jun 05 '20 05:06 osayb

Sorry to ask a n00b quesiton but. Where is the config file on a pfsense box?

nevermind found it /usr/local/etc:nextdns.config

Lynxshd avatar Aug 29 '20 20:08 Lynxshd

Looks like the document(wiki) didn't mention the config path, and it can vary based on different environment, on Ubuntu, it's /etc/nextdns.conf. @rs is it something that you can mention on the document, or printed from the log? Thanks.

PeterDaveHello avatar Mar 31 '22 15:03 PeterDaveHello

The default config path is platform specific.

rs avatar Mar 31 '22 17:03 rs

Then print it somewhere will be really useful 👍

PeterDaveHello avatar Mar 31 '22 17:03 PeterDaveHello

In some cases it is not a file but the system's configuration API.

rs avatar Mar 31 '22 17:03 rs

Oh, wow, almost forgot that I saw the case somewhere ... then it's very hard for end-users to know, but need to guess, unless we're familiar with NextDNS cli inside 😅

Maybe just clearly let the user know that the config is stored via system's configuration API, or it's a file somewhere, no matter what?

PeterDaveHello avatar Mar 31 '22 17:03 PeterDaveHello

Most users don't care where the config is, they would just use the config set/del commands if needed.

rs avatar Mar 31 '22 17:03 rs

Oh yes, the implementation of del command would give me one less reason to know it!

PeterDaveHello avatar Mar 31 '22 17:03 PeterDaveHello

you have the nextdns config edit for that.

rs avatar Mar 31 '22 17:03 rs

Just trying to scripting the process, so that I can do the s\ame thing on different places, the edit function will be limited in this case, currently that's what I'm manually do it.

PeterDaveHello avatar Mar 31 '22 18:03 PeterDaveHello

We could add a list counter-part that would save the config it gets from stdin.

rs avatar Mar 31 '22 20:03 rs

Install vi or set your EDITOR env to your editor of choice.

rs avatar Oct 29 '22 16:10 rs