16 lines
289 B
Bash
Executable file
16 lines
289 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -eu
|
|
umask 077
|
|
|
|
certbot certificates 2> /dev/null | awk '
|
|
{
|
|
if (/^ Certificate Name: /) { cert = $3 }
|
|
if (/^ Expiry Date: /) {
|
|
days = $6
|
|
if (days < 30) {
|
|
print cert " " days " days"
|
|
}
|
|
}
|
|
}
|
|
'
|