initial commit

This commit is contained in:
Fabian Bläse 2019-09-04 18:15:10 +02:00
commit 4654ff0d53
1 changed files with 23 additions and 0 deletions

23
update-dns.sh Normal file
View File

@ -0,0 +1,23 @@
#!/bin/sh
# exit script when command fails
set -e
if [ $# -ne 1 ]; then
echo "Usage: $0 <git-directory>" >&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