From 2769486044c08bc6b92961146b2b54628b7705bb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Mon, 4 Jul 2016 12:19:37 +0200
Subject: [PATCH] sssctl: manual page

Resolves:
https://fedorahosted.org/sssd/ticket/3055
---
 contrib/sssd.spec.in |  1 +
 src/man/Makefile.am  |  2 +-
 src/man/po/po4a.cfg  |  1 +
 src/man/sssctl.8.xml | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 src/man/sssctl.8.xml

diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in
index b8a9efc07e2cb9325b5d445d546ec145391b95c2..d5730a474eb554fa81123e03b1815d2a71da7496 100644
--- a/contrib/sssd.spec.in
+++ b/contrib/sssd.spec.in
@@ -950,6 +950,7 @@ done
 %{_mandir}/man8/sss_override.8*
 %{_mandir}/man8/sss_debuglevel.8*
 %{_mandir}/man8/sss_seed.8*
+%{_mandir}/man8/sssctl.8*
 
 %files -n python-sssdconfig -f python2_sssdconfig.lang
 %defattr(-,root,root,-)
diff --git a/src/man/Makefile.am b/src/man/Makefile.am
index 433d1cddcca75c35b38846e97e455765fe99f77c..cd23b02f6db05dd5f08b6764df4663eafc6f6e7a 100644
--- a/src/man/Makefile.am
+++ b/src/man/Makefile.am
@@ -51,7 +51,7 @@ man_MANS = \
     sssd-krb5.5 sssd-simple.5 \
     sssd_krb5_locator_plugin.8 sss_groupshow.8 \
     pam_sss.8 sss_obfuscate.8 sss_cache.8 sss_debuglevel.8 sss_seed.8 \
-    sss_override.8 idmap_sss.8 \
+    sss_override.8 idmap_sss.8 sssctl.8 \
     $(NULL)
 
 if BUILD_SAMBA
diff --git a/src/man/po/po4a.cfg b/src/man/po/po4a.cfg
index ca9d66a2a616f4ced179fb78edf50f94b77dcec3..2a51731fca4125654da383c9bf3ca7caf827a918 100644
--- a/src/man/po/po4a.cfg
+++ b/src/man/po/po4a.cfg
@@ -27,6 +27,7 @@
 [type:docbook] sss_ssh_authorizedkeys.1.xml $lang:$(builddir)/$lang/sss_ssh_authorizedkeys.1.xml
 [type:docbook] sss_ssh_knownhostsproxy.1.xml $lang:$(builddir)/$lang/sss_ssh_knownhostsproxy.1.xml
 [type:docbook] idmap_sss.8.xml $lang:$(builddir)/$lang/idmap_sss.8.xml
+[type:docbook] sssctl.8.xml $lang:$(builddir)/$lang/sssctl.8.xml
 [type:docbook] include/service_discovery.xml $lang:$(builddir)/$lang/include/service_discovery.xml opt:"-k 0"
 [type:docbook] include/upstream.xml $lang:$(builddir)/$lang/include/upstream.xml opt:"-k 0"
 [type:docbook] include/failover.xml $lang:$(builddir)/$lang/include/failover.xml opt:"-k 0"
diff --git a/src/man/sssctl.8.xml b/src/man/sssctl.8.xml
new file mode 100644
index 0000000000000000000000000000000000000000..120f2368776513df29e8c0d8db8bf4cacd0f4925
--- /dev/null
+++ b/src/man/sssctl.8.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE reference PUBLIC "-//OASIS//DTD DocBook V4.4//EN"
+"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<reference>
+<title>SSSD Manual pages</title>
+<refentry>
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/upstream.xml" />
+
+    <refmeta>
+        <refentrytitle>sssctl</refentrytitle>
+        <manvolnum>8</manvolnum>
+    </refmeta>
+
+    <refnamediv id='name'>
+        <refname>sssctl</refname>
+        <refpurpose>SSSD control and status utility</refpurpose>
+    </refnamediv>
+
+    <refsynopsisdiv id='synopsis'>
+        <cmdsynopsis>
+            <command>sssctl</command>
+            <arg choice='plain'><replaceable>COMMAND</replaceable></arg>
+            <arg choice='opt'>
+                <replaceable>options</replaceable>
+            </arg>
+        </cmdsynopsis>
+    </refsynopsisdiv>
+
+    <refsect1 id='description'>
+        <title>DESCRIPTION</title>
+        <para>
+            <command>sssctl</command> provides simple and unified way to obtain
+            information about SSSD status such as active server or list of
+            auto-discovered servers and domains or information about cached
+            objects. It also provides tools to manage SSSD data files during
+            troubleshooting such as a safe way to remove cache files or fetching
+            all SSSD log files and more.
+        </para>
+    </refsect1>
+
+    <refsect1 id='commands'>
+        <title>AVAILABLE COMMANDS</title>
+        <para>
+            To list all available commands run <command>sssctl</command>
+            without any parameter. To print help for selected command
+            run <command>sssctl COMMAND --help</command>.
+        </para>        
+    </refsect1>
+
+    <refsect1 id='options'>
+        <title>COMMON OPTIONS</title>
+        <para>
+            Those options are available with all commands.
+        </para>
+        <variablelist remap='IP'>
+            <varlistentry>
+                <term>
+                    <option>--debug</option>
+                    <replaceable>LEVEL</replaceable>
+                </term>
+                <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/debug_levels.xml" />
+            </varlistentry>
+        </variablelist>
+    </refsect1>
+
+    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="include/seealso.xml" />
+
+</refentry>
+</reference>
-- 
2.1.0

