Skip to content

Commit

Permalink
Merge pull request #224 from Raphux/master
Browse files Browse the repository at this point in the history
bash_completion capability for passhport-admin
  • Loading branch information
Raphux committed Nov 5, 2017
2 parents fe03ff3 + 95335c2 commit ac93870
Show file tree
Hide file tree
Showing 11 changed files with 1,122 additions and 111 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Add bash_completion capability to passhport-admin
==================================================

We provide a bash_completion file, so that you can use [TAB] to auto-complete the passhport-admin command.

As root, copy the provide file to `/etc/bash_completion/passhport-admin` directory, and source it :

.. code-block:: none
# cp /home/passhport/passhport/tools/passhport-admin.bash_completion /etc/bash_completion.d/passhport-admin
# . /etc/bash_completion.d/passhport-admin
You can now do things like these :

.. code-block:: none
# passhport-admin [TAB][TAB]
target user targetgroup usergroup
# passhport-admin t[TAB]
# passhport-admin target[TAB]
target targetgroup
# passhport-admin targetg[TAB]
# passhport-admin targetgroup [TAB][TAB]
list search show create edit adduser rmuser
addtarget rmtarget addusergroup rmusergroup
addtargetgroup rmtargetgroup delete
# passhport-admin user show [TAB][TAB]
john rachel alfred bruce kim jared
# passhport-admin user show j[TAB]
john jared
# passhport-admin user show ja[TAB]
# passhport-admin user show jared
1 change: 1 addition & 0 deletions docs/installation-and-configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ This chapter describes the installation on different distro, and the main config
installation-on-debian
installation-on-centos
use-postgresql-as-backend
add-bash_completion-to-passhport-admin
11 changes: 11 additions & 0 deletions docs/installation-and-configuration/use-postgresql-as-backend.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Use PostgreSQL as database backend
===================================

Install psycopg2 python module
-----------------------------------------------

If you did not use the packaged version of passhport (deb/rpm), proceed as follow. If you used the package version, go directly below, to the `PostgreSQL configuration`_.

If you want to use PostgreSQL has the database backend you'll need to add a python module : psycopg2.

As passhport user, install psycopg2 :
Expand All @@ -9,6 +14,9 @@ As passhport user, install psycopg2 :
$ /home/passhport/passhport-run-env/bin/pip install psycopg2
PostgreSQL configuration
-------------------------

Create a passhport user in you postgreSQL server (may be different on your distro, this is just an example) :

.. code-block:: none
Expand All @@ -29,6 +37,9 @@ Add a password to postgreSQL passhport user :
postgres=# \q
$
passhportd configuration
-------------------------

Change the configuration of the *passhportd.ini* file (``/etc/passhport/passhportd.ini``). You need to change the ``SQLALCHEMY_DATABASE_URI`` parameter to :

.. code-block:: none
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2017, LibrIT
# This file is distributed under the same license as the PaSSHport package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PaSSHport \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-05 21:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.5.1\n"

#: ../../installation-and-configuration/add-bash_completion-to-passhport-admin.rst:2
msgid "Add bash_completion capability to passhport-admin"
msgstr ""

#: ../../installation-and-configuration/add-bash_completion-to-passhport-admin.rst:4
msgid ""
"We provide a bash_completion file, so that you can use [TAB] to auto-"
"complete the passhport-admin command."
msgstr ""

#: ../../installation-and-configuration/add-bash_completion-to-passhport-admin.rst:6
msgid ""
"As root, copy the provide file to `/etc/bash_completion/passhport-admin` "
"directory, and source it :"
msgstr ""

#: ../../installation-and-configuration/add-bash_completion-to-passhport-admin.rst:13
msgid "You can now do things like these :"
msgstr ""

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PaSSHport \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-11-02 16:55+0100\n"
"POT-Creation-Date: 2017-11-05 21:34+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand All @@ -18,7 +18,7 @@ msgstr ""
"Generated-By: Babel 2.5.1\n"

#: ../../installation-and-configuration/index.rst:2
msgid "Installation and configuration"
msgid "PaSSHport installation and configuration"
msgstr ""

#: ../../installation-and-configuration/index.rst:4
Expand All @@ -27,3 +27,6 @@ msgid ""
" configuration principles."
msgstr ""

#~ msgid "Installation and configuration"
#~ msgstr ""

0 comments on commit ac93870

Please sign in to comment.