From c737d6f1b90093cab2dfefce484787266afd57e1 Mon Sep 17 00:00:00 2001 From: mortzu Date: Wed, 1 Oct 2014 22:10:26 +0200 Subject: [PATCH] added persistent alfred data file --- update-dns.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/update-dns.sh b/update-dns.sh index d3465a4..e3c2dcc 100755 --- a/update-dns.sh +++ b/update-dns.sh @@ -36,6 +36,12 @@ WORK_DIR="$(dirname $(readlink -nf $0))" # set safe path PATH="${WORK_DIR}:/sbin:/usr/sbin:/bin:/usr/bin" +# alfred data file +ALFRED_DATA_FILE='/var/cache/ffhb/alfred.json' + +# create alfred data directory +mkdir -p "$(dirname $ALFRED_DATA_FILE)" + # define variable to count loops declare -i NUM=0 @@ -107,3 +113,6 @@ fi # reload nameserver rndc reload >/dev/null + +# copy alfred file +cp "$TMP_FILE" "$ALFRED_DATA_FILE"