Added add_domain_slave.sh #50
Loading…
Reference in New Issue
No description provided.
Delete Branch "bind-add-automatic-slave"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Script to add a DNS slave zone automatically (on Evolix servers).
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 !
NAK
@ -0,0 +9,4 @@
usage() {
cat <<EOT
$0 domain_to_add
Exemple: $0 mydomain.com
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
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"
empty
command ?@ -0,0 +35,4 @@
echo "$domain" > $stdin
sleep 2
# Send mail
subject="[AUTO-${clientName}] Added slave domain of $webServerName $domain"
Should almost definitely also add
Auto-Submitted: auto-generated
header in the mail.