Skip to content

Commit

Permalink
Merge pull request #746 from BastilleBSD/setup-cleaning
Browse files Browse the repository at this point in the history
setup: warning deprecation of bastille0 option and updates documentation
  • Loading branch information
yaazkal authored Nov 24, 2024
2 parents 624a5c9 + cee4d66 commit 20276f5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ automatically. This feature is new since version 0.10.20231013.
```shell
ishmael ~ # bastille setup -h
ishmael ~ # Usage: bastille setup [pf|bastille0|zfs|vnet]
ishmael ~ # Usage: bastille setup [pf|network|zfs|vnet]
```
On fresh installations it is likely safe to run `bastille setup` with no
Expand Down
2 changes: 1 addition & 1 deletion docs/chapters/subcommands/setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ options for a Bastille host with one command.
.. code-block:: shell
ishmael ~ # bastille setup -h ## display setup help
ishmael ~ # bastille setup bastille0 ## only configure loopback interface
ishmael ~ # bastille setup network ## only configure loopback interface
ishmael ~ # bastille setup pf ## only configure default firewall
ishmael ~ # bastille setup zfs ## only configure ZFS storage
ishmael ~ # bastille setup vnet ## only configure VNET bridge
Expand Down
13 changes: 9 additions & 4 deletions usr/local/share/bastille/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@

bastille_config="/usr/local/etc/bastille/bastille.conf"
. /usr/local/share/bastille/common.sh
# shellcheck source=/usr/local/etc/bastille/bastille.conf

if [ ! -f "${bastille_config}" ]
then
if [ ! -f "${bastille_config}" ]; then
cp /usr/local/etc/bastille/bastille.conf.sample ${bastille_config}
fi

# shellcheck source=/usr/local/etc/bastille/bastille.conf
. ${bastille_config}

usage() {
Expand Down Expand Up @@ -141,7 +141,12 @@ help|-h|--help)
pf|firewall)
configure_pf
;;
network|bastille0|loopback)
bastille0)
# TODO remove in future release 0.13
warn "'bastille setup bastille0' will be deprecated in the next 0.13 version."
configure_network
;;
network|loopback)
configure_network
;;
zfs|storage)
Expand Down

0 comments on commit 20276f5

Please sign in to comment.