From 9c0b600bc59bf2b7eed476edab3e52b5ea426e5f Mon Sep 17 00:00:00 2001 From: tschettervictor Date: Tue, 21 Jan 2025 08:14:09 -0700 Subject: [PATCH] docs: Document new jcp command --- docs/chapters/subcommands/cp.rst | 2 +- docs/chapters/subcommands/jcp.rst | 30 ++++++++++++++++++++++++++++++ docs/chapters/subcommands/rcp.rst | 22 ++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 docs/chapters/subcommands/jcp.rst create mode 100644 docs/chapters/subcommands/rcp.rst diff --git a/docs/chapters/subcommands/cp.rst b/docs/chapters/subcommands/cp.rst index e551fb92..57b610b9 100644 --- a/docs/chapters/subcommands/cp.rst +++ b/docs/chapters/subcommands/cp.rst @@ -2,7 +2,7 @@ cp == -This command allows efficiently copying files from host to container(s). +This command allows copying files from host to jail(s). .. code-block:: shell diff --git a/docs/chapters/subcommands/jcp.rst b/docs/chapters/subcommands/jcp.rst new file mode 100644 index 00000000..fbaeee05 --- /dev/null +++ b/docs/chapters/subcommands/jcp.rst @@ -0,0 +1,30 @@ +=== +jcp +=== + +This command allows copying files from jail to jail(s). + +.. code-block:: shell + + ishmael ~ # bastille cp bastion /tmp/resolv.conf-cf ALL /etc/resolv.conf + [unbound0]: + /usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound0/root/etc/resolv.conf + [unbound1]: + /usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/unbound1/root/etc/resolv.conf + [squid]: + /usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/squid/root/etc/resolv.conf + [nginx]: + /usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/nginx/root/etc/resolv.conf + [folsom]: + /usr/local/bastille/jails/bastion/root/tmp/resolv.conf-cf -> /usr/local/bastille/jails/folsom/root/etc/resolv.conf + +Unless you see errors reported in the output the `jcp` was successful. + +.. code-block:: shell + + ishmael ~ # bastille cp help + Usage: bastille jcp [option(s)] SOURCE_JAIL JAIL_PATH DEST_JAIL JAIL_PATH + Options: + + -q | --quiet Suppress output. + -x | --debug Enable debug mode. diff --git a/docs/chapters/subcommands/rcp.rst b/docs/chapters/subcommands/rcp.rst new file mode 100644 index 00000000..fd4ab86f --- /dev/null +++ b/docs/chapters/subcommands/rcp.rst @@ -0,0 +1,22 @@ +=== +rcp +=== + +This command allows copying files from jail to host. + +.. code-block:: shell + + ishmael ~ # bastille rcp bastion /test/testfile.txt /tmp/testfile.txt + [bastion]: + /usr/local/bastille/jails/bastion/root/test/testfile.txt -> /tmp/testfile.txt + +Unless you see errors reported in the output the `rcp` was successful. + +.. code-block:: shell + + ishmael ~ # bastille rcp help + Usage: bastille rcp [option(s)] TARGET JAIL_PATH HOST_PATH + Options: + + -q | --quiet Suppress output. + -x | --debug Enable debug mode.