git.lirion.de

Of git, get, and gud

aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Pfeiffer <coding _ lirion.de> 2019-04-08 15:42:22 +0200
committerHarald Pfeiffer <coding _ lirion.de> 2019-04-08 15:42:22 +0200
commit562e469b6e3f40499ab3dcdfdd09ab5a25055d38 (patch)
treebd7ec18d151196cebbcce39906b3aed29de409cb
parent6d231fcb99330ecef7be691df93c1d3907358412 (diff)
downloadlinux-scripts-562e469b6e3f40499ab3dcdfdd09ab5a25055d38.tar.bz2
use CNFDIR instead of hardcoded values in script
-rw-r--r--sbin/zoneresign7
1 files changed, 3 insertions, 4 deletions
diff --git a/sbin/zoneresign b/sbin/zoneresign
index c905d31..48ab78f 100644
--- a/sbin/zoneresign
+++ b/sbin/zoneresign
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+# shellcheck disable=SC2015
# Small script to sign the zone with a new salt.
# LICENSE: LGPLv3
@@ -79,8 +80,6 @@ while getopts :vhkl SHOPT;do
done
shift $((OPTIND-1))
-PDIR="$(pwd)"
-
[ "$VERB" -ne 0 ]&&printf "Checking named configuration for \"%s\"..." "$1"
/usr/sbin/named-checkzone -q "$1" "$ZDBDIR/db.$1" >/dev/null 2>&1&&\
/usr/sbin/named-checkconf -z >/dev/null 2>&1
@@ -117,14 +116,14 @@ esac
MYSALT="$(head -c 1000 /dev/random|sha1sum|cut -b 1-16)"
case "$VERB" in
0)
- /usr/sbin/dnssec-signzone -3 "$MYSALT" -A -N INCREMENT -o "$1" -K "/etc/named" -t \
+ /usr/sbin/dnssec-signzone -3 "$MYSALT" -A -N INCREMENT -o "$1" -K "$CNFDIR" -t \
"$ZDBDIR/db.$1" >/dev/null 2>&1
;;
*)
printf "Signing zone \"%s\"...\n" "$1"
printf "Salt: %s\n" "$MYSALT"
printf "Serial: %s\n" "$NEWSER"
- /usr/sbin/dnssec-signzone -3 "$MYSALT" -A -N INCREMENT -o "$1" -K "/etc/named" -t \
+ /usr/sbin/dnssec-signzone -3 "$MYSALT" -A -N INCREMENT -o "$1" -K "$CNFDIR" -t \
"$ZDBDIR/db.$1"
;;
esac