purge (400B)
1 #!/bin/rc -e 2 3 # This script utilizes lscert and rmcert to 4 # remove all but the most recent selector 5 # Despite other scripts supporting arbitrary selectors, 6 # this script enforces a # YYYYMMDD format for selectors. 7 8 # Check format 9 for (s in `{dkim/lscert}) { 10 echo $s | grep -E '^[0-9]{8}$' >/dev/null 11 } 12 13 old = `{dkim/lscert | sort -r | tail -n +2} 14 for (s in $old) { 15 echo RMCERT $s 16 dkim/rmcert $s 17 }