Added add_domain_slave.sh #50

Open
benpro wants to merge 1 commits from bind-add-automatic-slave into master
Contributor

Script to add a DNS slave zone automatically (on Evolix servers).

Script to add a DNS slave zone automatically (on Evolix servers).
lpoujol approved these changes 2019-04-02 10:30:48 +02:00
lpoujol left a comment
Owner

I'm not fluent with this area of the project.

As long as you've tested your changes youre good to go :)

Don't forget to document your changes !

I'm not fluent with this area of the project. As long as you've tested your changes youre good to go :) Don't forget to document your changes !
mtrossevin requested changes 2023-11-17 15:15:42 +01:00
mtrossevin left a comment
Owner

NAK

NAK
@ -0,0 +9,4 @@
usage() {
cat <<EOT
$0 domain_to_add
Exemple: $0 mydomain.com
Owner

Should be using example.com here too.

Should be using example.com here too.
@ -0,0 +26,4 @@
# Connect to $slaveServer and add slave domain.
stdin=/tmp/empty-in
stdout=/tmp/empty-out
result=/tmp/result
Owner

Should be using mktemp(1).

Should be using `mktemp(1)`.
@ -0,0 +29,4 @@
result=/tmp/result
[[ -e $stdin ]] && rm -f $stdin
[[ -e $stdout ]] && rm -f $stdout
empty -f -i $stdin -o $stdout -L $result ssh ${sshUser}@${slaveServer} "sudo /usr/share/scripts/bind-slave-${clientName}.sh"
Owner
  1. What is this empty command ?
  2. This require ssh access to the secondary DNS server, even if we did limit access to this one command, this seems like a bad idea.
1. What is this `empty` command ? 2. This require ssh access to the secondary DNS server, even if we did limit access to this one command, this seems like a bad idea.
@ -0,0 +35,4 @@
echo "$domain" > $stdin
sleep 2
# Send mail
subject="[AUTO-${clientName}] Added slave domain of $webServerName $domain"
Owner

Should almost definitely also add Auto-Submitted: auto-generated header in the mail.

Should almost definitely also add `Auto-Submitted: auto-generated` header in the mail.
This pull request has changes requested by an official reviewer.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
Sign in to join this conversation.
No description provided.