From 635c1dabb875215509e0dd088f412942097592ba Mon Sep 17 00:00:00 2001
From: Matthew Harmsen <mharmsen@redhat.com>
Date: Fri, 17 Jul 2015 20:38:06 -0600
Subject: [PATCH] Added 'pkidaemon' man page.

---
 base/server/man/man1/pkidaemon.1 | 301 +++++++++++++++++++++++++++++++++++++++
 specs/pki-core.spec              |   1 +
 2 files changed, 302 insertions(+)
 create mode 100644 base/server/man/man1/pkidaemon.1

diff --git a/base/server/man/man1/pkidaemon.1 b/base/server/man/man1/pkidaemon.1
new file mode 100644
index 0000000..165ce23
--- /dev/null
+++ b/base/server/man/man1/pkidaemon.1
@@ -0,0 +1,301 @@
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH pkidaemon 1 "Jul 8, 2015" "version 10.2" "pkidaemon" Dogtag Team
+.\" Please adjust this date whenever revising the man page.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh        disable hyphenation
+.\" .hy        enable hyphenation
+.\" .ad l      left justify
+.\" .ad b      justify to both left and right margins
+.\" .nf        disable filling
+.\" .fi        enable filling
+.\" .br        insert line break
+.\" .sp <n>    insert n+1 empty lines
+.\" for man page specific macros, see man(7)
+.SH NAME
+\fBpkidaemon\fR \- provides status management of PKI instances
+
+.SH SYNOPSIS
+.nf
+\fBpkidaemon {start|status} instance-type [instance-name]\fR
+.fi
+.TP
+\fBNote:\fP Although this tool currently resides in the \fB/usr/bin\fP directory, proper use of it requires it to be run with super user privileges.
+
+.SH DESCRIPTION
+.PP
+The \fBpkidaemon\fR command with the 'status' argument provides a way to display the status of all existing PKI instances on a machine, or optionally, an individual PKI instance by specifying an optional \fB[instance-name]\fP.
+.PP
+The \fBpkidaemon\fR 'start' argument is currently only used internally by the systemctl scripts.
+.PP
+Currently, although the \fBpkidaemon\fR 'instance-type' argument states that it can be either \fBapache\fP or \fBtomcat\fP, only the \fBtomcat\fP argument will yield useful details.
+
+.SH OPTIONS
+As stated above, the only optional argument to \fBpkidaemon\fR is \fB[instance-name]\fP.  If a valid instance name is specified, only the status of that instance will be displayed.
+
+.SH EXAMPLES
+
+For the following examples, two instances were installed.  The first contained a CA, KRA, OCSP, TKS and TPS in a shared PKI instance named 'pki-tomcat', while the second simply contained a CA running on different ports and named 'pki-tomcat-2'.
+
+.SS Listing the status of all local PKI instances on this machine:
+.PP
+\fBpkidaemon status tomcat\fR
+
+REPORT STATUS OF 'tomcat' INSTANCE(S):
+
+Status for pki-tomcat: pki-tomcat is running ..
+
+    [CA Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/ca/ee/ca
+    Secure Agent URL    = https://pki.example.com:8443/ca/agent/ca
+    Secure EE URL       = https://pki.example.com:8443/ca/ee/ca
+    Secure Admin URL    = https://pki.example.com:8443/ca/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/ca
+    Tomcat Port         = 8005 (for shutdown)
+
+    [DRM Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/kra/ee/kra
+    Secure Agent URL    = https://pki.example.com:8443/kra/agent/kra
+    Secure Admin URL    = https://pki.example.com:8443/kra/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/kra
+    Tomcat Port         = 8005 (for shutdown)
+
+    [OCSP Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/ocsp/ee/ocsp
+    Secure Agent URL    = https://pki.example.com:8443/ocsp/agent/ocsp
+    Secure EE URL       = https://pki.example.com:8443/ocsp/ee/ocsp
+    Secure Admin URL    = https://pki.example.com:8443/ocsp/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/ocsp
+    Tomcat Port         = 8005 (for shutdown)
+
+    [TKS Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/tks/ee/tks
+    Secure Agent URL    = https://pki.example.com:8443/tks/agent/tks
+    Secure Admin URL    = https://pki.example.com:8443/tks/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/tks
+    Tomcat Port         = 8005 (for shutdown)
+
+    [TPS Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/tps
+    Secure URL          = https://pki.example.com:8443/tps
+    Tomcat Port         = 8005 (for shutdown)
+    Unsecure PHONE HOME = http://pki.example.com:8080/tps/phoneHome
+    Secure PHONE HOME   = https://pki.example.com:8443/tps/phoneHome
+
+    [CA Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  Root CA (Security Domain)
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [DRM Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  DRM
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [OCSP Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  OCSP
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [TKS Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  TKS
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [TPS Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  TPS
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+Status for pki-tomcat-2: pki-tomcat-2 is running ..
+
+    [CA Status Definitions]
+    Unsecure URL        = http://pki.example.com:18080/ca/ee/ca
+    Secure Agent URL    = https://pki.example.com:18443/ca/agent/ca
+    Secure EE URL       = https://pki.example.com:18443/ca/ee/ca
+    Secure Admin URL    = https://pki.example.com:18443/ca/services
+    PKI Console Command = pkiconsole https://pki.example.com:18443/ca
+    Tomcat Port         = 18005 (for shutdown)
+
+    [CA Configuration Definitions]
+    PKI Instance Name:   pki-tomcat-2
+
+    PKI Subsystem Type:  Root CA (Security Domain)
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:18443
+    ====================================================================
+
+FINISHED REPORTING STATUS OF 'tomcat' INSTANCE(S).
+
+.SS Listing the status of the PKI instance named 'pki-tomcat':
+.PP
+\fBpkidaemon status tomcat pki-tomcat\fR
+
+Status for pki-tomcat: pki-tomcat is running ..
+
+    [CA Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/ca/ee/ca
+    Secure Agent URL    = https://pki.example.com:8443/ca/agent/ca
+    Secure EE URL       = https://pki.example.com:8443/ca/ee/ca
+    Secure Admin URL    = https://pki.example.com:8443/ca/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/ca
+    Tomcat Port         = 8005 (for shutdown)
+
+    [DRM Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/kra/ee/kra
+    Secure Agent URL    = https://pki.example.com:8443/kra/agent/kra
+    Secure Admin URL    = https://pki.example.com:8443/kra/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/kra
+    Tomcat Port         = 8005 (for shutdown)
+
+    [OCSP Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/ocsp/ee/ocsp
+    Secure Agent URL    = https://pki.example.com:8443/ocsp/agent/ocsp
+    Secure EE URL       = https://pki.example.com:8443/ocsp/ee/ocsp
+    Secure Admin URL    = https://pki.example.com:8443/ocsp/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/ocsp
+    Tomcat Port         = 8005 (for shutdown)
+
+    [TKS Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/tks/ee/tks
+    Secure Agent URL    = https://pki.example.com:8443/tks/agent/tks
+    Secure Admin URL    = https://pki.example.com:8443/tks/services
+    PKI Console Command = pkiconsole https://pki.example.com:8443/tks
+    Tomcat Port         = 8005 (for shutdown)
+
+    [TPS Status Definitions]
+    Unsecure URL        = http://pki.example.com:8080/tps
+    Secure URL          = https://pki.example.com:8443/tps
+    Tomcat Port         = 8005 (for shutdown)
+    Unsecure PHONE HOME = http://pki.example.com:8080/tps/phoneHome
+    Secure PHONE HOME   = https://pki.example.com:8443/tps/phoneHome
+
+    [CA Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  Root CA (Security Domain)
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [DRM Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  DRM
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [OCSP Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  OCSP
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [TKS Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  TKS
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+    [TPS Configuration Definitions]
+    PKI Instance Name:   pki-tomcat
+
+    PKI Subsystem Type:  TPS
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:8443
+    ====================================================================
+
+.SS Listing the status of the PKI instance named 'pki-tomcat-2':
+.PP
+\fBpkidaemon status tomcat pki-tomcat-2\fR
+
+Status for pki-tomcat-2: pki-tomcat-2 is running ..
+
+    [CA Status Definitions]
+    Unsecure URL        = http://pki.example.com:18080/ca/ee/ca
+    Secure Agent URL    = https://pki.example.com:18443/ca/agent/ca
+    Secure EE URL       = https://pki.example.com:18443/ca/ee/ca
+    Secure Admin URL    = https://pki.example.com:18443/ca/services
+    PKI Console Command = pkiconsole https://pki.example.com:18443/ca
+    Tomcat Port         = 18005 (for shutdown)
+
+    [CA Configuration Definitions]
+    PKI Instance Name:   pki-tomcat-2
+
+    PKI Subsystem Type:  Root CA (Security Domain)
+
+    Registered PKI Security Domain Information:
+    ====================================================================
+    Name:  example.com Security Domain
+    URL:   https://pki.example.com:18443
+    ====================================================================
+
+.SH BUGS
+Report bugs to http://bugzilla.redhat.com.
+
+.SH AUTHORS
+Matthew Harmsen <mharmsen@redhat.com>.  \fBpkidaemon\fP was written by the Certificate Server project.
+
+.SH COPYRIGHT
+Copyright (c) 2015 Red Hat, Inc. This is licensed under the GNU General Public License, version 2 (GPLv2). A copy of this license is available at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
+
+.SH SEE ALSO
+.BR pkispawn(8),
+.BR pkidestroy(8),
+.BR pki_default.cfg(5),
+.BR pki(1)
diff --git a/specs/pki-core.spec b/specs/pki-core.spec
index 93ad88d..ccf8bbf 100644
--- a/specs/pki-core.spec
+++ b/specs/pki-core.spec
@@ -898,6 +898,7 @@ systemctl daemon-reload
 %{_javadir}/pki/pki-cmscore.jar
 %{_javadir}/pki/pki-tomcat.jar
 %dir %{_sharedstatedir}/pki
+%{_mandir}/man1/pkidaemon.1.gz
 %{_mandir}/man5/pki_default.cfg.5.gz
 %{_mandir}/man8/pki-server-upgrade.8.gz
 %{_mandir}/man8/pkidestroy.8.gz
-- 
1.8.3.1

