Bug fix
authorAndreas Bilke <andreas@bilke.org>
Sun, 21 Aug 2016 14:49:55 +0000 (16:49 +0200)
committerAndreas Bilke <andreas@bilke.org>
Sun, 21 Aug 2016 14:49:55 +0000 (16:49 +0200)
dns/rotate-zsh.sh

index 397507e..b758e52 100755 (executable)
@@ -41,7 +41,8 @@ if [ -z "$OLDKEYS" ]; then
    exit 1
 fi
 
-if grep -L "Inactive" $OLDKEYS > /dev/null;
+ACTIVEKEY="$(grep -L "Inactive" $OLDKEYS || true)"
+if [ -z $ACTIVEKEY ];
 then
    echo "Unable to find an active zone-signing key, exiting." >&2
    exit 1