From 6bb68be863eb6604a343307cb55292f5416a6e91 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 18 Oct 2013 15:04:57 +0200 Subject: [PATCH] Update and rename dhclient-exit-hook-nsupdate.sh to nsupdate-dhclient-exit-hook.sh --- bash/dhclient-exit-hook-nsupdate.sh | 14 ------------ bash/nsupdate-dhclient-exit-hook.sh | 33 +++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 14 deletions(-) delete mode 100644 bash/dhclient-exit-hook-nsupdate.sh create mode 100644 bash/nsupdate-dhclient-exit-hook.sh diff --git a/bash/dhclient-exit-hook-nsupdate.sh b/bash/dhclient-exit-hook-nsupdate.sh deleted file mode 100644 index 838eb32..0000000 --- a/bash/dhclient-exit-hook-nsupdate.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -NS=/usr/local/bin/nsupdate.sh -key=/etc/bind/dhcp.key -zone=0l.de -host=wg.0l.de -server=127.0.0.1 - -case $reason in - BOUND|RENEW|REBIND|TIMEOUT) - $NS update -d $new_ip_address -k $key -z $zone -n $server -i $interface $host ;; - RELEASE) - $NS delete -d $old_ip_address -k $key -z $zone -n $server $host ;; -esac diff --git a/bash/nsupdate-dhclient-exit-hook.sh b/bash/nsupdate-dhclient-exit-hook.sh new file mode 100644 index 0000000..f9c92a2 --- /dev/null +++ b/bash/nsupdate-dhclient-exit-hook.sh @@ -0,0 +1,33 @@ +#!/bin/bash +## + # dhclient wrapper to update your dns + # + # @copyright 2013 Steffen Vogel + # @license http://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0 + # @author Steffen Vogel + # @link http://www.steffenvogel.de + ## +## + # Licensed under the Apache License, Version 2.0 (the "License"); + # you may not use this file except in compliance with the License. + # You may obtain a copy of the License at + # + # Unless required by applicable law or agreed to in writing, software + # distributed under the License is distributed on an "AS IS" BASIS, + # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + # or implied. See the License for the specific language governing + # permissions and limitations under the License. +## + +NS=/usr/local/bin/nsupdate.sh +key=/etc/bind/dhcp.key +zone=0l.de +host=wg.0l.de +server=127.0.0.1 + +case $reason in + BOUND|RENEW|REBIND|TIMEOUT) + $NS update -d $new_ip_address -k $key -z $zone -n $server -i $interface $host ;; + RELEASE) + $NS delete -d $old_ip_address -k $key -z $zone -n $server $host ;; +esac