diff --git a/LICENSE b/LICENSE index 18f2d80..507ba89 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2018, Christer Edwards +Copyright (c) 2018-2019, Christer Edwards All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 15069a6..cb22237 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Then, install via `pkg`. Example: ```shell -pkg add https://github.com/BastilleBSD/bastille/releases/download/0.3.20181130/bastille-0.3.20181130_2.txz +pkg add https://github.com/BastilleBSD/bastille/releases/download/0.3.20190204/bastille-0.3.20190204.txz ``` BETA binary packages are signed. These can be verified with this pubkey: @@ -191,15 +191,15 @@ a private (rfc1918) IP address. - ip ```shell -ishmael ~ # bastille create folsom 11.2-RELEASE 10.8.62.1 +ishmael ~ # bastille create folsom 12.0-RELEASE 10.8.62.1 -RELEASE: 11.2-RELEASE. +RELEASE: 12.0-RELEASE. NAME: folsom. IP: 10.8.62.1. ``` -This command will create a 11.2-RELEASE jail assigning the 10.8.62.1 ip address +This command will create a 12.0-RELEASE jail assigning the 10.8.62.1 ip address to the new system. I recommend using private (rfc1918) ip address ranges for your jails. diff --git a/docs/conf.py b/docs/conf.py index b937144..f822839 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -8,7 +8,7 @@ else: # -- Project information ----------------------------------------------------- project = 'Bastille' -copyright = '2018, Christer Edwards' +copyright = '2018-2019, Christer Edwards' author = 'Christer Edwards' # The short X.Y version diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index b3f7823..d73f4c6 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ . /usr/local/etc/bastille/bastille.conf ## version -BASTILLE_VERSION="0.3.20190102" +BASTILLE_VERSION="0.3.20190204" usage() { cat << EOF diff --git a/usr/local/etc/bastille/bastille.conf b/usr/local/etc/bastille/bastille.conf index a89da0b..d5981a6 100644 --- a/usr/local/etc/bastille/bastille.conf +++ b/usr/local/etc/bastille/bastille.conf @@ -9,3 +9,4 @@ bastille_logsdir=${bastille_prefix}/logs bastille_releasesdir=${bastille_prefix}/releases bastille_templatesdir=${bastille_prefix}/templates bastille_sharedir=/usr/local/share/bastille +bastille_bootstrap_archives=base diff --git a/usr/local/share/bastille/bootstrap.sh b/usr/local/share/bastille/bootstrap.sh index fbd5dc3..b7eecc9 100644 --- a/usr/local/share/bastille/bootstrap.sh +++ b/usr/local/share/bastille/bootstrap.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -60,20 +60,15 @@ bootstrap_release() { ### create $bastille_base/release/$release directory ### fetch $release/base.txz -o $bastille_base/cache/$release/base.txz - ### fetch $release/lib32.txz -o $bastille_base/cache/$release/lib32.txz ### extract $release/base.txz to $bastille_base/release/$release - ### extract $release/lib32.txz to $bastille_base/release/$release if [ ! -d "${bastille_releasesdir}/${RELEASE}" ]; then mkdir -p "${bastille_releasesdir}/${RELEASE}" - sh ${bastille_sharedir}/freebsd_dist_fetch.sh -r ${RELEASE} base lib32 + sh ${bastille_sharedir}/freebsd_dist_fetch.sh -r ${RELEASE} ${bastille_bootstrap_archives} echo echo -e "${COLOR_GREEN}Extracting FreeBSD ${RELEASE} base.txz.${COLOR_RESET}" /usr/bin/tar -C "${bastille_releasesdir}/${RELEASE}" -xf "${bastille_cachedir}/${RELEASE}/base.txz" - echo -e "${COLOR_GREEN}Extracting FreeBSD ${RELEASE} lib32.txz.${COLOR_RESET}" - /usr/bin/tar -C "${bastille_releasesdir}/${RELEASE}" -xf "${bastille_cachedir}/${RELEASE}/lib32.txz" - echo -e "${COLOR_GREEN}Bootstrap successful.${COLOR_RESET}" echo -e "${COLOR_GREEN}See 'bastille --help' for available commands.${COLOR_RESET}" echo diff --git a/usr/local/share/bastille/cmd.sh b/usr/local/share/bastille/cmd.sh index 22eaac1..795a88c 100644 --- a/usr/local/share/bastille/cmd.sh +++ b/usr/local/share/bastille/cmd.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/console.sh b/usr/local/share/bastille/console.sh index a9db63f..0e9ba15 100644 --- a/usr/local/share/bastille/console.sh +++ b/usr/local/share/bastille/console.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/cp.sh b/usr/local/share/bastille/cp.sh index 74ad6ea..cfa955e 100644 --- a/usr/local/share/bastille/cp.sh +++ b/usr/local/share/bastille/cp.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index df1265c..fc6f371 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/destroy.sh b/usr/local/share/bastille/destroy.sh index bc92243..375deeb 100644 --- a/usr/local/share/bastille/destroy.sh +++ b/usr/local/share/bastille/destroy.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -55,8 +55,9 @@ destroy_jail() { echo -e "${COLOR_GREEN}Deleting Jail: ${NAME}.${COLOR_RESET}" chflags -R noschg ${bastille_jail_base} rm -rf ${bastille_jail_base} - echo -e "${COLOR_GREEN}Note: jail console logs not destroyed.${COLOR_RESET}" - echo -e "${COLOR_GREEN}${bastille_jail_log}${COLOR_RESET}" + mv ${bastille_jail_log} ${bastille_jail_log}-$(date +%F) + echo -e "${COLOR_GREEN}Note: jail console logs archived.${COLOR_RESET}" + echo -e "${COLOR_GREEN}${bastille_jail_log}-$(date +%F)${COLOR_RESET}" echo fi } diff --git a/usr/local/share/bastille/htop.sh b/usr/local/share/bastille/htop.sh index 6395351..b69ef54 100644 --- a/usr/local/share/bastille/htop.sh +++ b/usr/local/share/bastille/htop.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/list.sh b/usr/local/share/bastille/list.sh index 5106475..0b39b19 100644 --- a/usr/local/share/bastille/list.sh +++ b/usr/local/share/bastille/list.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/pkg.sh b/usr/local/share/bastille/pkg.sh index e26bad6..0c4ef7c 100644 --- a/usr/local/share/bastille/pkg.sh +++ b/usr/local/share/bastille/pkg.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/restart.sh b/usr/local/share/bastille/restart.sh index b3f115c..65478dc 100644 --- a/usr/local/share/bastille/restart.sh +++ b/usr/local/share/bastille/restart.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/service.sh b/usr/local/share/bastille/service.sh index ccd0ed4..a943c4a 100644 --- a/usr/local/share/bastille/service.sh +++ b/usr/local/share/bastille/service.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/start.sh b/usr/local/share/bastille/start.sh index 502f0c3..40e6e9f 100644 --- a/usr/local/share/bastille/start.sh +++ b/usr/local/share/bastille/start.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/stop.sh b/usr/local/share/bastille/stop.sh index 01bcaad..84eb0e9 100644 --- a/usr/local/share/bastille/stop.sh +++ b/usr/local/share/bastille/stop.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -57,6 +57,5 @@ fi for _jail in ${JAILS}; do echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}" jail -f "${bastille_jailsdir}/${_jail}/jail.conf" -r ${_jail} - pfctl -f /etc/pf.conf echo done diff --git a/usr/local/share/bastille/sysrc.sh b/usr/local/share/bastille/sysrc.sh index aa737fe..2083844 100644 --- a/usr/local/share/bastille/sysrc.sh +++ b/usr/local/share/bastille/sysrc.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index 3bdc2f3..298cea4 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/top.sh b/usr/local/share/bastille/top.sh index 45f45af..5e63084 100644 --- a/usr/local/share/bastille/top.sh +++ b/usr/local/share/bastille/top.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/update.sh b/usr/local/share/bastille/update.sh index 22f48bf..2f9bef5 100644 --- a/usr/local/share/bastille/update.sh +++ b/usr/local/share/bastille/update.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/upgrade.sh b/usr/local/share/bastille/upgrade.sh index 545a7a1..39e125e 100644 --- a/usr/local/share/bastille/upgrade.sh +++ b/usr/local/share/bastille/upgrade.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/usr/local/share/bastille/verify.sh b/usr/local/share/bastille/verify.sh index c3b2968..7abadb8 100644 --- a/usr/local/share/bastille/verify.sh +++ b/usr/local/share/bastille/verify.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (c) 2018, Christer Edwards +# Copyright (c) 2018-2019, Christer Edwards # All rights reserved. # # Redistribution and use in source and binary forms, with or without