From 7700b9beff70403362bd4730604496e6a5a24f2f Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Tue, 13 Nov 2018 10:38:33 -0700 Subject: [PATCH] 0.3.20181112 template support --- README.md | 83 ++++++++++++- {bastille/usr => usr}/local/bin/bastille | 20 ++- .../local/etc/bastille/bastille.conf | 0 {rc.d => usr/local/etc/rc.d}/bastille | 0 .../local/share/bastille/bootstrap.sh | 4 + .../usr => usr}/local/share/bastille/cmd.sh | 1 - .../local/share/bastille/colors.pre.sh | 0 .../local/share/bastille/console.sh | 3 +- .../usr => usr}/local/share/bastille/cp.sh | 0 .../local/share/bastille/create.sh | 15 +-- .../local/share/bastille/destroy.sh | 0 .../share/bastille/freebsd_dist_fetch.sh | 0 .../usr => usr}/local/share/bastille/htop.sh | 2 + .../usr => usr}/local/share/bastille/list.sh | 0 .../usr => usr}/local/share/bastille/pkg.sh | 1 - .../local/share/bastille/restart.sh | 0 .../local/share/bastille/service.sh | 0 .../usr => usr}/local/share/bastille/start.sh | 1 - .../usr => usr}/local/share/bastille/stop.sh | 1 - .../usr => usr}/local/share/bastille/sysrc.sh | 0 usr/local/share/bastille/template.sh | 116 ++++++++++++++++++ .../usr => usr}/local/share/bastille/top.sh | 2 + .../local/share/bastille/update.sh | 0 .../local/share/bastille/upgrade.sh | 0 .../local/share/bastille/verify.sh | 0 25 files changed, 218 insertions(+), 31 deletions(-) rename {bastille/usr => usr}/local/bin/bastille (92%) rename {bastille/usr => usr}/local/etc/bastille/bastille.conf (100%) rename {rc.d => usr/local/etc/rc.d}/bastille (100%) rename {bastille/usr => usr}/local/share/bastille/bootstrap.sh (97%) rename {bastille/usr => usr}/local/share/bastille/cmd.sh (99%) rename {bastille/usr => usr}/local/share/bastille/colors.pre.sh (100%) rename {bastille/usr => usr}/local/share/bastille/console.sh (96%) rename {bastille/usr => usr}/local/share/bastille/cp.sh (100%) rename {bastille/usr => usr}/local/share/bastille/create.sh (94%) rename {bastille/usr => usr}/local/share/bastille/destroy.sh (100%) rename {bastille/usr => usr}/local/share/bastille/freebsd_dist_fetch.sh (100%) rename {bastille/usr => usr}/local/share/bastille/htop.sh (99%) rename {bastille/usr => usr}/local/share/bastille/list.sh (100%) rename {bastille/usr => usr}/local/share/bastille/pkg.sh (98%) rename {bastille/usr => usr}/local/share/bastille/restart.sh (100%) rename {bastille/usr => usr}/local/share/bastille/service.sh (100%) rename {bastille/usr => usr}/local/share/bastille/start.sh (98%) rename {bastille/usr => usr}/local/share/bastille/stop.sh (98%) rename {bastille/usr => usr}/local/share/bastille/sysrc.sh (100%) create mode 100644 usr/local/share/bastille/template.sh rename {bastille/usr => usr}/local/share/bastille/top.sh (99%) rename {bastille/usr => usr}/local/share/bastille/update.sh (100%) rename {bastille/usr => usr}/local/share/bastille/upgrade.sh (100%) rename {bastille/usr => usr}/local/share/bastille/verify.sh (100%) diff --git a/README.md b/README.md index f4ae9ea6..8b5bffb1 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Available Commands: start Start a stopped jail. stop Stop a running jail. sysrc Safely edit rc files within targeted jail(s). + template Apply Bastille template to running jail(s). top Display and update information about the top(1) cpu processes. update Update jail base -pX release. upgrade Upgrade jail release to X.Y-RELEASE. @@ -130,7 +131,7 @@ release version as the argument. ```shell ishmael ~ # bastille bootstrap 11.2-RELEASE -ishmael ~ # bastille bootstrap 10.4-RELEASE +ishmael ~ # bastille bootstrap 12.0-RELEASE ``` This command will ensure the required directory structures are in place and @@ -440,6 +441,86 @@ Note: jail console logs not destroyed. ``` +bastille template +----------------- +Bastille supports a templating system allowing you to apply files, pkgs and +execute commands inside the jail automatically. + +Currently supported template hooks are: `PRE`, `CONFIG`, `PKG`, `SYSRC`, `CMD`. +Planned template hooks include: `FSTAB`, `PF` + +Templates are created in `${bastille_prefix}/templates` and can leverage any of +the template hooks. Simply create a new directory named after the template. eg; + +```shell +mkdir -p /usr/local/bastille/templates/base +``` + +To leverage a template hook, create an UPPERCASE file in the root of the +template directory named after the hook you want to execute. eg; + +```shell +echo "zsh vim-console git-lite htop" > /usr/local/bastille/templates/base/PKG +echo "/usr/bin/chsh -s /usr/local/bin/zsh" > /usr/local/bastille/templates/base/CMD +echo "etc root usr" > /usr/local/bastille/templates/base/CONFIG +``` + +Template hooks are executed in specific order and require specific syntax to +work as expected. This table outlines those requirements: + +| HOOK | format | example | +|---------|------------------|--------------------------------------| +| PRE/CMD | /bin/sh command | /usr/bin/chsh -s /usr/local/bin/zsh | +| CONFIG | path | etc root usr | +| PKG | port/pkg name(s) | vim-console zsh git-lite tree htop | +| SYSRC | sysrc command(s) | nginx_enable="YES" nginx_flags="..." | + +In addition to supporting template hooks, Bastille supports overlaying files +into the jail. This is done by placing the files in their full path, using the +template directory as "/". + +An example here may help. Think of `/usr/local/bastille/templates/base`, our +example template, as the root of our filesystem overlay. If you create an +`etc/hosts` or `etc/resolv.conf` *inside* the base template directory, these +can be overlayed into your jail. + +Note: due to the way FreeBSD segregates user-space, the majority of your +overlayed template files will be in `usr/local`. The few general +exceptions are the `etc/hosts`, `etc/resolv.conf`, and `etc/rc.conf.local`. + +After populating `usr/local/` with custom config files that your jail will +use, be sure to include `usr` in the template CONFIG definition. eg; + +```shell +echo "etc usr" > /usr/local/bastille/templates/base/CONFIG +``` + +The above example "etc usr" will include anything under "etc" and "usr" inside +the template. You do not need to list individual files. Just include the +top-level directory name. + +Applying Templates +------------------ + +Jails must be running to apply templates. + +Bastille includes a `template` sub-command. This sub-command requires a target +and a template name. As covered in the previous section, template names +correspond to directory names in the `bastille/templates` directory. + +```shell +ishmael ~ # bastille template folsom base +[folsom]: +Copying files... +Copy complete. +Installing packages. +...[snip]... +Executing final command(s). +chsh: user information updated +Template Complete. + +``` + bastille top ------------ diff --git a/bastille/usr/local/bin/bastille b/usr/local/bin/bastille similarity index 92% rename from bastille/usr/local/bin/bastille rename to usr/local/bin/bastille index 476ce8d1..2786a550 100755 --- a/bastille/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -28,11 +28,13 @@ # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +SAVED_TERM=$TERM + . /usr/local/share/bastille/colors.pre.sh . /usr/local/etc/bastille/bastille.conf ## version -BASTILLE_VERSION="0.3.20181107" +BASTILLE_VERSION="0.3.20181112" usage() { @@ -58,6 +60,7 @@ Available Commands: start Start a stopped container. stop Stop a running container. sysrc Safely edit rc files within targeted container(s). + template Apply file templates to targeted jail(s). top Display and update information about the top(1) cpu processes. update Update container base -pX release. upgrade Upgrade container release to X.Y-RELEASE. @@ -73,7 +76,6 @@ EOF CMD=$1 shift -CMD_ENV= # Handle special-case commands first. case "${CMD}" in @@ -88,22 +90,13 @@ esac # Filter out all non-commands case "${CMD}" in -cmd|console|cp|create|destroy|list|pkg|restart|start|stop|sysrc|verify) +cmd|cp|create|destroy|list|pkg|restart|start|stop|sysrc|template|verify) ;; update|upgrade) CMD_ENV="${CMD_ENV} PAGER=cat" ;; console|bootstrap|htop|top) - while read envvar envvalue; do - case "${envvar}" in - TERM) - CMD_ENV="${CMD_ENV} ${envvar}=${envvalue}" - ;; - esac - done <<-EOF - $(env | sed -Ee 's,^([^=]*)=(.*),\1 \2,') - EOF - ;; + ;; bootstrap|update|upgrade) while read envvar envvalue; do case "${envvar}" in @@ -120,6 +113,7 @@ bootstrap|update|upgrade) ;; esac + SCRIPTPATH="${bastille_sharedir}/${CMD}.sh" : ${UMASK:=022} diff --git a/bastille/usr/local/etc/bastille/bastille.conf b/usr/local/etc/bastille/bastille.conf similarity index 100% rename from bastille/usr/local/etc/bastille/bastille.conf rename to usr/local/etc/bastille/bastille.conf diff --git a/rc.d/bastille b/usr/local/etc/rc.d/bastille similarity index 100% rename from rc.d/bastille rename to usr/local/etc/rc.d/bastille diff --git a/bastille/usr/local/share/bastille/bootstrap.sh b/usr/local/share/bastille/bootstrap.sh similarity index 97% rename from bastille/usr/local/share/bastille/bootstrap.sh rename to usr/local/share/bastille/bootstrap.sh index 4e2a7a78..4b8ed02b 100644 --- a/bastille/usr/local/share/bastille/bootstrap.sh +++ b/usr/local/share/bastille/bootstrap.sh @@ -120,6 +120,10 @@ case "${RELEASE}" in bootstrap echo -e "${COLOR_RED}BETA releases are complete untested.${COLOR_RESET}" ;; +12.0-BETA4) + bootstrap + echo -e "${COLOR_RED}BETA releases are complete untested.${COLOR_RESET}" + ;; *) echo -e "${COLOR_RED}BETA releases are complete untested.${COLOR_RESET}" usage diff --git a/bastille/usr/local/share/bastille/cmd.sh b/usr/local/share/bastille/cmd.sh similarity index 99% rename from bastille/usr/local/share/bastille/cmd.sh rename to usr/local/share/bastille/cmd.sh index 58650506..96f60c40 100644 --- a/bastille/usr/local/share/bastille/cmd.sh +++ b/usr/local/share/bastille/cmd.sh @@ -56,5 +56,4 @@ fi for _jail in ${JAILS}; do echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" jexec -l ${_jail} $2 - echo -e "${NC}" done diff --git a/bastille/usr/local/share/bastille/colors.pre.sh b/usr/local/share/bastille/colors.pre.sh similarity index 100% rename from bastille/usr/local/share/bastille/colors.pre.sh rename to usr/local/share/bastille/colors.pre.sh diff --git a/bastille/usr/local/share/bastille/console.sh b/usr/local/share/bastille/console.sh similarity index 96% rename from bastille/usr/local/share/bastille/console.sh rename to usr/local/share/bastille/console.sh index 040afdbb..fc527822 100644 --- a/bastille/usr/local/share/bastille/console.sh +++ b/usr/local/share/bastille/console.sh @@ -55,6 +55,5 @@ fi for _jail in ${JAILS}; do echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" - jexec -l ${_jail} /usr/bin/login -f root - echo -e "${NC}" + jexec -l ${_jail} /usr/bin/login -fp root done diff --git a/bastille/usr/local/share/bastille/cp.sh b/usr/local/share/bastille/cp.sh similarity index 100% rename from bastille/usr/local/share/bastille/cp.sh rename to usr/local/share/bastille/cp.sh diff --git a/bastille/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh similarity index 94% rename from bastille/usr/local/share/bastille/create.sh rename to usr/local/share/bastille/create.sh index ddbe44d1..e71eac75 100644 --- a/bastille/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -70,8 +70,8 @@ create_jail() { if [ ! -d "${bastille_jail_base}" ]; then mkdir -p "${bastille_jail_base}" - mkdir -p "${bastille_jail_path}/usr" mkdir -p "${bastille_jail_path}/usr/home" + mkdir -p "${bastille_jail_path}/usr/local" fi if [ ! -d "${bastille_jail_template}" ]; then @@ -97,9 +97,9 @@ create_jail() { ## ro cd "${bastille_jail_path}" echo - echo -e "${COLOR_GREEN}RELEASE: ${RELEASE}.${COLOR_RESET}" echo -e "${COLOR_GREEN}NAME: ${NAME}.${COLOR_RESET}" echo -e "${COLOR_GREEN}IP: ${IP}.${COLOR_RESET}" + echo -e "${COLOR_GREEN}RELEASE: ${RELEASE}.${COLOR_RESET}" echo for _link in bin boot lib libexec rescue sbin usr/bin usr/include usr/lib usr/lib32 usr/libdata usr/libexec usr/sbin usr/share usr/src; do @@ -107,7 +107,7 @@ create_jail() { done ## link home properly - ln -sf usr/home home + ln -s usr/home home ## rw cp -a "${bastille_releasesdir}/${RELEASE}/.cshrc" "${bastille_jail_path}" @@ -135,8 +135,7 @@ create_jail() { fi ## TZ: UTC - ln -s "/usr/share/zoneinfo/Etc/UTC ${bastille_jail_root}/etc/localtime" - ln -s "/.template/usr/local ${bastille_jail_root}/usr/local" + ln -s /usr/share/zoneinfo/Etc/UTC etc/localtime } # Handle special-case commands first. @@ -174,12 +173,6 @@ if [ -d "/usr/local/bastille/jails/${NAME}/root/.bastille" ]; then exit 1 fi -## check for name/root/.template -if [ -d "/usr/local/bastille/jails/${NAME}/root/.template" ]; then - echo -e "${COLOR_RED}Jail: ${NAME} already created. ${NAME}/root/.template exists.${COLOR_RESET}" - exit 1 -fi - ## check if a running jail matches name if running_jail ${NAME}; then echo -e "${COLOR_RED}Running jail matches name.${COLOR_RESET}" diff --git a/bastille/usr/local/share/bastille/destroy.sh b/usr/local/share/bastille/destroy.sh similarity index 100% rename from bastille/usr/local/share/bastille/destroy.sh rename to usr/local/share/bastille/destroy.sh diff --git a/bastille/usr/local/share/bastille/freebsd_dist_fetch.sh b/usr/local/share/bastille/freebsd_dist_fetch.sh similarity index 100% rename from bastille/usr/local/share/bastille/freebsd_dist_fetch.sh rename to usr/local/share/bastille/freebsd_dist_fetch.sh diff --git a/bastille/usr/local/share/bastille/htop.sh b/usr/local/share/bastille/htop.sh similarity index 99% rename from bastille/usr/local/share/bastille/htop.sh rename to usr/local/share/bastille/htop.sh index 8c5f566f..551be9e0 100644 --- a/bastille/usr/local/share/bastille/htop.sh +++ b/usr/local/share/bastille/htop.sh @@ -64,3 +64,5 @@ for _jail in ${JAILS}; do fi echo -e "${COLOR_RESET}" done + +TERM=${SAVED_TERM} diff --git a/bastille/usr/local/share/bastille/list.sh b/usr/local/share/bastille/list.sh similarity index 100% rename from bastille/usr/local/share/bastille/list.sh rename to usr/local/share/bastille/list.sh diff --git a/bastille/usr/local/share/bastille/pkg.sh b/usr/local/share/bastille/pkg.sh similarity index 98% rename from bastille/usr/local/share/bastille/pkg.sh rename to usr/local/share/bastille/pkg.sh index 5fc165f6..cfefdaf4 100644 --- a/bastille/usr/local/share/bastille/pkg.sh +++ b/usr/local/share/bastille/pkg.sh @@ -56,5 +56,4 @@ fi for _jail in ${JAILS}; do echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" jexec -l ${_jail} /usr/sbin/pkg $2 - echo -e "${COLOR_RESET}" done diff --git a/bastille/usr/local/share/bastille/restart.sh b/usr/local/share/bastille/restart.sh similarity index 100% rename from bastille/usr/local/share/bastille/restart.sh rename to usr/local/share/bastille/restart.sh diff --git a/bastille/usr/local/share/bastille/service.sh b/usr/local/share/bastille/service.sh similarity index 100% rename from bastille/usr/local/share/bastille/service.sh rename to usr/local/share/bastille/service.sh diff --git a/bastille/usr/local/share/bastille/start.sh b/usr/local/share/bastille/start.sh similarity index 98% rename from bastille/usr/local/share/bastille/start.sh rename to usr/local/share/bastille/start.sh index 92d99c85..bff5cefe 100644 --- a/bastille/usr/local/share/bastille/start.sh +++ b/usr/local/share/bastille/start.sh @@ -62,7 +62,6 @@ fi for _jail in ${JAILS}; do echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" jail -f "${bastille_jailsdir}/${_jail}/jail.conf" -c ${_jail} - echo -e "${COLOR_RESET}" done ## HUP the firewall diff --git a/bastille/usr/local/share/bastille/stop.sh b/usr/local/share/bastille/stop.sh similarity index 98% rename from bastille/usr/local/share/bastille/stop.sh rename to usr/local/share/bastille/stop.sh index dad1d6b3..704cc8c5 100644 --- a/bastille/usr/local/share/bastille/stop.sh +++ b/usr/local/share/bastille/stop.sh @@ -57,7 +57,6 @@ fi for _jail in ${JAILS}; do echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" jail -f "${bastille_jailsdir}/${_jail}/jail.conf" -r ${_jail} - echo -e "${COLOR_RESET}" done ## HUP the firewall diff --git a/bastille/usr/local/share/bastille/sysrc.sh b/usr/local/share/bastille/sysrc.sh similarity index 100% rename from bastille/usr/local/share/bastille/sysrc.sh rename to usr/local/share/bastille/sysrc.sh diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh new file mode 100644 index 00000000..eaa15643 --- /dev/null +++ b/usr/local/share/bastille/template.sh @@ -0,0 +1,116 @@ +#!/bin/sh +# +# Copyright (c) 2018, Christer Edwards +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# * Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. /usr/local/share/bastille/colors.pre.sh +. /usr/local/etc/bastille/bastille.conf + +usage() { + echo -e "${COLOR_RED}Usage: bastille template [ALL|glob] template.${COLOR_RESET}" + exit 1 +} + +# Handle special-case commands first. +case "$1" in +help|-h|--help) + usage + ;; +esac + +if [ $# -gt 2 ] || [ $# -lt 2 ]; then + usage +fi + +if [ "$1" = 'ALL' ]; then + JAILS=$(jls -N name) +fi +if [ "$1" != 'ALL' ]; then + JAILS=$(jls -N name | grep "$1") +fi + +TEMPLATE=$2 +bastille_template=${bastille_templatesdir}/${TEMPLATE} + +for _jail in ${JAILS}; do + echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" + + ## pre + if [ -s "${bastille_template}/PRE" ]; then + echo -e "${COLOR_GREEN}Executing PRE-command(s).${COLOR_RESET}" + bastille_templatepre=$(cat "${bastille_template}/PRE") + jexec -l "${_jail}" "${bastille_templatepre}" + fi + + ## config + if [ -s "${bastille_template}/CONFIG" ]; then + echo -e "${COLOR_GREEN}Copying files...${COLOR_RESET}" + for _dir in $(cat "${bastille_template}/CONFIG"); do + cp -a "${bastille_template}/${_dir}" "${bastille_jailsdir}/${_jail}/root" + done + echo -e "${COLOR_GREEN}Copy complete.${COLOR_RESET}" + fi + + ## fstab + if [ -s "${bastille_template}/FSTAB" ]; then + bastille_templatefstab=$(cat "${bastille_template}/FSTAB") + echo -e "${COLOR_GREEN}Updating fstab.${COLOR_RESET}" + fi + + ## pf + if [ -s "${bastille_template}/PF" ]; then + bastille_templatepf=$(cat "${bastille_template}/PF") + echo -e "${COLOR_GREEN}Generating PF profile.${COLOR_RESET}" + fi + + ## pkg (bootstrap + pkg) + if [ -s "${bastille_template}/PKG" ]; then + bastille_templatepkg=$(cat "${bastille_template}/PKG") + echo -e "${COLOR_GREEN}Installing packages.${COLOR_RESET}" + jexec -l ${_jail} env ASSUME_ALWAYS_YES="YES" /usr/sbin/pkg bootstrap + jexec -l ${_jail} env ASSUME_ALWAYS_YES="YES" /usr/sbin/pkg audit -F + jexec -l ${_jail} env ASSUME_ALWAYS_YES="YES" /usr/sbin/pkg install -y ${bastille_templatepkg} + fi + + ## sysrc + if [ -s "${bastille_template}/SYSRC" ]; then + bastille_templatesys=$(cat "${bastille_template}/SYSRC") + echo -e "${COLOR_GREEN}Updating services.${COLOR_RESET}" + jexec -l ${_jail} /usr/sbin/sysrc ${bastille_templatesys} + fi + + ## cmd + if [ -s "${bastille_template}/CMD" ]; then + bastille_templatecmd=$(cat "${bastille_template}/CMD") + echo -e "${COLOR_GREEN}Executing final command(s).${COLOR_RESET}" + jexec -l ${_jail} ${bastille_templatecmd} + fi + echo -e "${COLOR_GREEN}Template Complete.${COLOR_RESET}" + echo + echo +done diff --git a/bastille/usr/local/share/bastille/top.sh b/usr/local/share/bastille/top.sh similarity index 99% rename from bastille/usr/local/share/bastille/top.sh rename to usr/local/share/bastille/top.sh index a37d4be3..0d5f67df 100644 --- a/bastille/usr/local/share/bastille/top.sh +++ b/usr/local/share/bastille/top.sh @@ -59,3 +59,5 @@ for _jail in ${JAILS}; do jexec -l ${_jail} /usr/bin/top echo -e "${COLOR_RESET}" done + +TERM=${SAVED_TERM} diff --git a/bastille/usr/local/share/bastille/update.sh b/usr/local/share/bastille/update.sh similarity index 100% rename from bastille/usr/local/share/bastille/update.sh rename to usr/local/share/bastille/update.sh diff --git a/bastille/usr/local/share/bastille/upgrade.sh b/usr/local/share/bastille/upgrade.sh similarity index 100% rename from bastille/usr/local/share/bastille/upgrade.sh rename to usr/local/share/bastille/upgrade.sh diff --git a/bastille/usr/local/share/bastille/verify.sh b/usr/local/share/bastille/verify.sh similarity index 100% rename from bastille/usr/local/share/bastille/verify.sh rename to usr/local/share/bastille/verify.sh