Added verbose and version options in usage fonction. master
authorEmmanuel Lacour <elacour@home-dn.net>
Thu, 8 Jun 2006 20:57:08 +0000 (20:57 +0000)
committerEmmanuel Lacour <elacour@home-dn.net>
Thu, 8 Jun 2006 20:57:08 +0000 (20:57 +0000)
sslexpire/sslexpire

index 0cd5060..6b2646e 100755 (executable)
@@ -59,7 +59,7 @@ my $tmp;
 # output : -m = mail, default = stdout
 # host : -h host, -p port, default = from config file
 # config : -f configfile, default /etc/sslexpire/sslexpire.conf 
-# standard : --help, --version
+# standard : --help, --version, --verbose
 
 my %opts;
 GetOptions (\%opts,
@@ -88,7 +88,7 @@ if (($opts{'host'}) && ($opts{'port'})) {
 
     # Parse config file
 
-    open (CONF,$conf) or die "Couldn't read configuration file $conf: $!\n";
+    open (CONF,$conf) or die "ERR: Couldn't read configuration file $conf: $!\n";
     while (<CONF>) {
         # Skip comments
         next if (/^[ \t]*#/);
@@ -138,7 +138,9 @@ sub usage {
 -p, --port=TCPPORT     check this port on the previous host
 -m, --mail             report by mail instead of STDOUT
 -c, --conf=FILE        use this config file
+-v, --verbose          print out verbose messages
     --help             print this help, then exit
+    --version          print out version information
 ";
     exit;
 }