7 for key in $(find /var/lib/unbound -type f) ; do
8 if ! grep -v '^;' "$key" | grep -q '\[ VALID \]'; then
9 not_valid="$not_valid $(basename "$key" .key)"
12 if [ -n "$not_valid" ]; then
13 echo "Warning: no valid trust anchors found for$not_valid."
17 old_anchors=$(find /var/lib/unbound -type f -mtime +5)
18 if [ -n "$old_anchors" ]; then
19 echo "Warning: Some keys are old: $old_anchors."
24 echo "OK: All keys in /var/lib/unbound recent and valid"