Permalink
Browse files

Added --help usage information

With the --help command line argument, the following information is printed:

$ ./fwknop-launcher-lsof.pl --help

Usage: fwknop-launcher-lsof.pl [options]

Options:

    -c,  --config     <file>   - Path to fwknop-launcher.conf config file.
    -l,  --lsof-cmd   <path>   - Path to lsof command.
    -f,  --fwknop-cmd <path>   - Path to fwknop client command.
    -s,  --sleep   <seconds>   - Specify sleep interval (default:
                                 1 seconds)
    -n   --no-daemon           - Run in foreground mode.
    -u,  --user   <username>   - Specify username (usually this is not
                                 needed).
         --home-dir <dir>      - Path to user's home directory (usually
                                 this is not needed).
    -v   --verbose             - Print verbose information to the terminal
                                 (requires --no-daemon).
         --help                - Print usage info and exit.
  • Loading branch information...
1 parent 71ea0c6 commit 05f3cec96a03251d1a308d90200c9dc479ae4558 @mrash committed Sep 26, 2011
Showing with 22 additions and 1 deletion.
  1. +22 −1 extras/fwknop-launcher/fwknop-launcher-lsof.pl
@@ -38,7 +38,6 @@
#
use POSIX;
-use Data::Dumper;
use Getopt::Long;
use strict;
@@ -326,4 +325,26 @@ ()
}
sub usage() {
+ print <<_HELP_;
+
+Usage: fwknop-launcher-lsof.pl [options]
+
+Options:
+
+ -c, --config <file> - Path to fwknop-launcher.conf config file.
+ -l, --lsof-cmd <path> - Path to lsof command.
+ -f, --fwknop-cmd <path> - Path to fwknop client command.
+ -s, --sleep <seconds> - Specify sleep interval (default:
+ $sleep_interval seconds)
+ -n --no-daemon - Run in foreground mode.
+ -u, --user <username> - Specify username (usually this is not
+ needed).
+ --home-dir <dir> - Path to user's home directory (usually
+ this is not needed).
+ -v --verbose - Print verbose information to the terminal
+ (requires --no-daemon).
+ --help - Print usage info and exit.
+
+_HELP_
+ exit 0;
}

0 comments on commit 05f3cec

Please sign in to comment.