From: Otto Date: Mon, 25 Oct 2021 12:53:53 +0000 (+0200) Subject: Move check to a shell script X-Git-Tag: dnsdist-1.7.0-beta1~1^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fc551342ebc49e01accc5d8b31bf0d233d64067;p=thirdparty%2Fpdns.git Move check to a shell script --- diff --git a/.github/workflows/secpoll.yml b/.github/workflows/secpoll.yml index 65a947dd06..cb1151792d 100644 --- a/.github/workflows/secpoll.yml +++ b/.github/workflows/secpoll.yml @@ -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 index 0000000000..67c6409744 --- /dev/null +++ b/docs/secpoll-check.sh @@ -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