Write a postlicyd(8) man page.
authorPierre Habouzit <madcoder@debian.org>
Sun, 11 Jan 2009 20:05:38 +0000 (21:05 +0100)
committerPierre Habouzit <madcoder@debian.org>
Sun, 11 Jan 2009 20:06:10 +0000 (21:06 +0100)
Also fix postlicyd so that it accepts a -h switch showing the help.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
postlicyd/Makefile
postlicyd/main-postlicyd.c
postlicyd/postlicyd.txt [new file with mode: 0644]

index fa11c24..c478cb8 100644 (file)
@@ -35,6 +35,7 @@
 include ../mk/tc.mk
 
 PROGRAMS  = postlicyd
 include ../mk/tc.mk
 
 PROGRAMS  = postlicyd
+DOCS      = postlicyd.8
 GENERATED = policy_tokens.h policy_tokens.c \
                                                filter_tokens.h filter_tokens.c \
                                                hook_tokens.h hook_tokens.c \
 GENERATED = policy_tokens.h policy_tokens.c \
                                                filter_tokens.h filter_tokens.c \
                                                hook_tokens.h hook_tokens.c \
index a0cf87e..888a393 100644 (file)
@@ -298,7 +298,7 @@ int main(int argc, char *argv[])
     bool port_from_cli = false;
     bool check_conf = false;
 
     bool port_from_cli = false;
     bool check_conf = false;
 
-    for (int c = 0; (c = getopt(argc, argv, "ufdc" "l:p:")) >= 0; ) {
+    for (int c = 0; (c = getopt(argc, argv, "hufdc" "l:p:")) >= 0; ) {
         switch (c) {
           case 'p':
             pidfile = optarg;
         switch (c) {
           case 'p':
             pidfile = optarg;
diff --git a/postlicyd/postlicyd.txt b/postlicyd/postlicyd.txt
new file mode 100644 (file)
index 0000000..8b7e51e
--- /dev/null
@@ -0,0 +1,61 @@
+postlicyd(8)
+============
+
+NAME
+----
+
+postlicyd - A postfix versatile Policy Daemon from the Postfix Tools Suite
+
+
+SYNOPSIS
+--------
+
+postlicyd [options] conf
+
+
+DESCRIPTION
+-----------
+
+TODO
+
+
+OPTIONS
+-------
+
+the `conf` argument shall be a path to a valid linkgit:postlicyd.conf[5] file.
+
+-h::
+    Show the help
+
+-c::
+    Only check the configuration and then exit.
+
+-d::
+    Change debug level (the more `-d` switches the higher the level is).
+
+-f::
+    Do not daemonize `postlicyd` on startup.
+
+-l <port>::
+    Change the port `postlicyd` will listen to. (Default: 10000).
+
+-p <path>::
+    Path to the pidfile where `pfix-srsd` will maintain its pid. Default is to
+    not use any pidfile.
+
+-u::
+    Work in unsafe mode: don't drop privileges when running as root.
+
+
+COPYRIGHT
+---------
+
+Copyright 2009 the Postfix Tools Suite Authors. License BSD.
+
+
+PFIXTOOLS
+---------
+
+`postlicyd` is part of the linkgit:pfixtools[7] suite.
+
+// vim:filetype=asciidoc:tw=78