Check if zone Name already exists
surrealchemist opened this issue · comments
Issue type
- Feature idea
cli53 version (cli53 --version)
cli53 version 0.8.10
I would find it helpful to have an option for cli53 to just exit if a zone already exists with the same name. It would make it easy to re-run a command to ensure the domain is there without having to have some other logic to manually check.
Sticking to the unix philosophy, I would use cli53 list
and grep
. Not sure this warrants a whole new command.
I was thinking more of just a flag to the create command so it skips creating if it exists.
Ended up doing something like this:
if ! cli53 export $domain > /dev/null 2>&1 ; then
cli53 create $domain
fi
I see - it is perfectly valid to create multiple domains for the same
domain name (you may have a private and public one, for instance). I think
given you can achieve it at least a couple of different ways, I wouldn't
consider adding this.
…On Fri, 22 Sep 2017 at 20:12 surrealchemist ***@***.***> wrote:
I was thinking more of just a flag to the create command so it skips
creating if it exists.
Ended up doing something like this:
if ! cli53 export $domain > /dev/null 2>&1 ; then
cli53 create $domain
fi
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#246 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAI7xVWirXnGmew8sSiQUP8tV8xaoXNRks5slAasgaJpZM4PhFPq>
.