summaryrefslogtreecommitdiff
path: root/crypt-expiry-check.in
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-10-13 15:11:44 +0200
committerErich Eckner <git@eckner.net>2016-10-13 15:11:44 +0200
commit7890c38cce1e5cfceb4b6e6fe994e2a742b8b765 (patch)
treedda6bd01d70f34f0a0e60775cdb62ca554045b6f /crypt-expiry-check.in
parent2707784034710b63ca97c050ccaff2b31501105a (diff)
downloadcrypt-expiry-check-7890c38cce1e5cfceb4b6e6fe994e2a742b8b765.tar.xz
manpage automatisch erzeugen
Diffstat (limited to 'crypt-expiry-check.in')
-rwxr-xr-xcrypt-expiry-check.in44
1 files changed, 24 insertions, 20 deletions
diff --git a/crypt-expiry-check.in b/crypt-expiry-check.in
index f634650..e631140 100755
--- a/crypt-expiry-check.in
+++ b/crypt-expiry-check.in
@@ -192,27 +192,27 @@ print_heading()
##########################################
usage()
{
- >&2 echo "This is crypt-expiry-check version #VERSION#"
+ >&2 echo "$(basename "$0") checks expiration of gpg keys and X.509 certificates and sends emails if keys are about to expire."
>&2 echo ""
- >&2 echo "Usage: $0 [ -e email address ] [ -x days ] [-q] [-a] [-b] [-h] [-i] [-n] [-v]"
- >&2 echo " { [ -s common_name:port] } || { [ -f cert_file ] } || { [ -c certificate file ] } || { [ -g email address ] }"
+ >&2 echo "Usage: $0 [ -e email address ] [ -x days ] [-q] [-a] [-b] [-h] [-i] [-n] [-v] { [ -s common_name:port] } || { [ -f cert_file ] } || { [ -c certificate file ] } || { [ -g email address ] }"
>&2 echo ""
- >&2 echo " -a : Send a warning message through E-mail"
- >&2 echo " -b : Will not print header"
- >&2 echo " -c cert file : Print the expiration date for the PEM or PKCS12 formatted certificate in cert file"
- >&2 echo " -e E-mail address : E-mail address to send expiration notices"
- >&2 echo " -f cert file : File with a list of FQDNs and ports"
- >&2 echo " -g E-mail address : E-mail address to check expiry of gpg-key from"
- >&2 echo " -h : Print this screen"
- >&2 echo " -i : Print the issuer of the certificate"
- >&2 echo " -k password : PKCS12 file password"
- >&2 echo " -n : Run as a Nagios plugin"
- >&2 echo " -s commmon_name:port : Server and Port to connect to (interactive mode)"
- >&2 echo " -t type : Specify the certificate type"
- >&2 echo " -q : Don't print anything on the console"
- >&2 echo " -v : Specify a specific protocol version to use (tls, ssl2, ssl3)"
- >&2 echo " -V : Only print validation data"
- >&2 echo " -x days : Certificate expiration interval (eg. if cert_date < days)"
+ >&2 echo " -a Send a warning message through E-mail"
+ >&2 echo " -b Will not print header"
+ >&2 echo " -c cert file Print the expiration date for the PEM or PKCS12 formatted certificate in cert file"
+ >&2 echo " -e E-mail address E-mail address to send expiration notices"
+ >&2 echo " -f cert file File with a list of FQDNs and ports"
+ >&2 echo " -g E-mail address E-mail address to check expiry of gpg-key from"
+ >&2 echo " -h Print this screen"
+ >&2 echo " -i Print the issuer of the certificate"
+ >&2 echo " -k password PKCS12 file password"
+ >&2 echo " -n Run as a Nagios plugin"
+ >&2 echo " -s commmon_name:port Server and Port to connect to (interactive mode)"
+ >&2 echo " -t type Specify the certificate type"
+ >&2 echo " -q Don't print anything on the console"
+ >&2 echo " -v Specify a specific protocol version to use (tls, ssl2, ssl3)"
+ >&2 echo " -V Only print validation data"
+ >&2 echo " -x days Certificate expiration interval (eg. if cert_date < days)"
+ >&2 echo " -Z Print version"
>&2 echo ""
}
@@ -449,7 +449,7 @@ check_gpg_key_status() {
#################################
### Start of main program
#################################
-while getopts abc:e:f:g:hik:nqs:t:x:v:V option
+while getopts abc:e:f:g:hik:nqs:t:x:v:VZ option
do
case "${option}"
in
@@ -499,6 +499,10 @@ do
x)
WARNDAYS=${OPTARG}
;;
+ Z)
+ echo '#VERSION#'
+ exit 0
+ ;;
*)
usage
exit 1