]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Move check to a shell script
authorOtto <otto.moerbeek@open-xchange.com>
Mon, 25 Oct 2021 12:53:53 +0000 (14:53 +0200)
committerOtto <otto.moerbeek@open-xchange.com>
Mon, 15 Nov 2021 13:05:30 +0000 (14:05 +0100)
.github/workflows/secpoll.yml
docs/secpoll-check.sh [new file with mode: 0644]

index 65a947dd069e7c0e1b485242b0628a8112452119..cb1151792dca745c9bdc3903c5e75567b2a859d7 100644 (file)
@@ -15,7 +15,7 @@ jobs:
         with:
           fetch-depth: 5
           submodules: recursive
-      - run: '! egrep -v \'^(@|;|$)\' docs/secpoll.zone | egrep -v \'(auth|recursor|dnsdist)-[0-9]\.[0-9]\.[0-9](-(alpha|beta|rc)[0-9]+)?[-_a-z0-9\.]*\.security-status +60 IN TXT "[1-3] .*"\''
+      - run: sh docs/secpoll-check.sh docs/secpoll.zone
       - run: echo 'deb [arch=amd64] http://repo.powerdns.com/ubuntu focal-auth-master main' | sudo tee /etc/apt/sources.list.d/pdns.list
       - run: "echo -ne 'Package: pdns-*\nPin: origin repo.powerdns.com\nPin-Priority: 600\n' | sudo tee /etc/apt/preferences.d/pdns"
       - run: sudo curl https://repo.powerdns.com/CBC8B383-pub.asc -o /etc/apt/trusted.gpg.d/CBC8B383-pub.asc
diff --git a/docs/secpoll-check.sh b/docs/secpoll-check.sh
new file mode 100644 (file)
index 0000000..67c6409
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+if [ $# -ne 1 ]; then
+  echo usage: $0 file
+  exit 1
+fi
+if ! egrep -v '^(@|;|$)' "$1" | egrep -v '(auth|recursor|dnsdist)-[0-9]\.[0-9]\.[0-9](-(alpha|beta|rc)[0-9]+)?[-_a-z0-9\.]*\.security-status +60 IN TXT "[1-3].*"' 
+then
+echo OK
+exit 0
+else
+echo Not OK
+exit 1
+fi