Copyright © 2016 <code@io7m.com> http://io7m.com Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Usage: jguard [options] [command] [command options]
Options:
-verbose
Set the minimum logging verbosity level
Default: info
Possible Values: [trace, debug, info, warn, error]
Commands:
start Start a jail
Usage: start [options]
Options:
* -file
The jail configuration file
-verbose
Set the minimum logging verbosity level
Default: info
Possible Values: [trace, debug, info, warn, error]
download-base-archive Download a binary archive for creating a jail
Usage: download-base-archive [options]
Options:
-arch
Override the system architecture
* -archive
The output file
-base-uri
Override the base URI
Default: http://ftp.freebsd.org/pub/FreeBSD/releases/
-fetch-archive
Select a specific archive file
Default: base.txz
-release
Override the system release
-retry
Set the number of retries for failed downloads (0 is unlimited)
Default: 10
-verbose
Set the minimum logging verbosity level
Default: info
Possible Values: [trace, debug, info, warn, error]
create-jail-base Create a base jail and template from an archive
Usage: create-jail-base [options]
Options:
* -archive
Select a specific archive file
-archive-format
Explicitly specify the archive format
Possible Values: [JAIL_ARCHIVE_FORMAT_TAR_XZ]
* -base
The created base directory
* -base-template
The created base template directory
-verbose
Set the minimum logging verbosity level
Default: info
Possible Values: [trace, debug, info, warn, error]
create-jail Create a jail
Usage: create-jail [options]
Options:
* -base
The base directory
* -base-template
The base template directory
* -hostname
The jail hostname
-ipv4
The jail IPv4 address
-ipv6
The jail IPv6 address
* -name
The jail name
* -root
The jail directory
* -start-command
The command that will be executed inside the jail on startup
-verbose
Set the minimum logging verbosity level
Default: info
Possible Values: [trace, debug, info, warn, error]
version Retrieve the program version
Usage: version [options]
Options:
-verbose
Set the minimum logging verbosity level
Default: info
Possible Values: [trace, debug, info, warn, error]
$ java -jar io7m-jguard-cmdline-0.1.0-main.jar
# java -jar jguard.jar start -file jail0.conf
# java -jar jguard.jar download-base-archive -archive /usr/jail/base.txz
# java -jar jguard.jar -Dhttp.proxyHost=proxy.example.com -Dhttp.proxyPort=3128 download-base-archive -archive /usr/jail/base.txz
# java -jar jguard.jar create-jail-base -archive /usr/jail/base.txz -base /usr/jail/base -base-template /usr/jail/base-template
# java -jar jguard.jar create-jail -base /usr/jail/base -base-template /usr/jail/base-template -hostname jail0.example.com -name jail0_example_com -root /usr/jail/jail0.example.com -start-command "/usr/local/bin/s6-svscan /service" -ipv4 10.8.0.23