From 4654ff0d531115f5636beb17bf1eb1b322728973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Bl=C3=A4se?= Date: Wed, 4 Sep 2019 18:15:10 +0200 Subject: [PATCH] initial commit --- update-dns.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 update-dns.sh diff --git a/update-dns.sh b/update-dns.sh new file mode 100644 index 0000000..c945e32 --- /dev/null +++ b/update-dns.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# exit script when command fails +set -e + +if [ $# -ne 1 ]; then + echo "Usage: $0 " >&2 + exit 1 +fi + +# navigate to directory given as parameter +cd $1 + +oldhash=$(git rev-parse HEAD) +git pull -q --ff-only + +/srv/fff-scripts/10-50-reverse.sh +/srv/fff-scripts/10-83-reverse.sh + +if [ "$oldhash" != "$(git rev-parse HEAD)" ]; then + /bin/systemctl reload bind9 +fi +