New port: sysutils/bastille

Bastille is a jail automation framework that allows you to
quickly create and manage FreeBSD jails.

The project focuses on secure defaults, automation and
repeatable templates.

WWW: https://bastillebsd.org

PR:		235679
Submitted by:	Christer Edwards <christer.edwards@gmail.com>
This commit is contained in:
Kurt Jaeger 2019-02-18 19:22:28 +00:00
parent 833d143ffd
commit 102ddc619b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=493313
6 changed files with 128 additions and 0 deletions

View File

@ -97,6 +97,7 @@
SUBDIR += bareos16-client-static
SUBDIR += bareos16-server
SUBDIR += bareos16-traymonitor
SUBDIR += bastille
SUBDIR += batmon
SUBDIR += battmond
SUBDIR += battray

View File

@ -0,0 +1,32 @@
# Created by: Christer Edwards <christer.edwards@gmail.com>
# $FreeBSD$
PORTNAME= bastille
PORTVERSION= 0.3.20190204
CATEGORIES= sysutils
MAINTAINER= christer.edwards@gmail.com
COMMENT= Jail automation framework
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USE_GITHUB= yes
GH_ACCOUNT= bastillebsd
GH_TAGNAME= 57bd13c
NO_BUILD= yes
NO_ARCH= yes
USE_RC_SUBR= bastille
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/${PREFIX}/bin/bastille ${STAGEDIR}${PREFIX}/bin
post-install:
${MKDIR} ${STAGEDIR}${ETCDIR}
${MKDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC}/${DATADIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
${INSTALL_DATA} ${WRKSRC}/${ETCDIR}/bastille.conf ${STAGEDIR}${ETCDIR}/bastille.conf.sample
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1549341320
SHA256 (bastillebsd-bastille-0.3.20190204-57bd13c_GH0.tar.gz) = 8e9cc6041e2e34455b148ca07e25bbd50f5a3369b0bde1b8d828c7afb88a36ce
SIZE (bastillebsd-bastille-0.3.20190204-57bd13c_GH0.tar.gz) = 494885

View File

@ -0,0 +1,62 @@
#!/bin/sh
# Bastille jail startup script
# $FreeBSD$
#
# PROVIDE: bastille
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following to /etc/rc.conf[.local] to enable this service
#
# bastille_enable (bool): Set to NO by default.
# Set it to YES to enable bastille.
# bastille_list (string): Set to "ALL" by default.
# Space separated list of jails to start.
#
. /etc/rc.subr
name=bastille
rcvar=${name}_enable
: ${bastille_enable:=NO}
: ${bastille_list:="ALL"}
command=%%PREFIX%%/bin/${name}
start_cmd="bastille_start"
stop_cmd="bastille_stop"
restart_cmd="bastille_stop && bastille_start"
bastille_start()
{
if [ ! -n "${bastille_list}" ]; then
echo "${bastille_list} is undefined"
return 1
fi
local _jail
for _jail in ${bastille_list}; do
echo "Starting Bastille Jail: ${_jail}"
${command} start ${_jail}
done
}
bastille_stop()
{
if [ ! -n "${bastille_list}" ]; then
echo "${bastille_list} is undefined"
return 1
fi
local _jail
for _jail in ${bastille_list}; do
echo "Stopping Bastille Jail: ${_jail}"
${command} stop ${_jail}
done
}
load_rc_config ${name}
run_rc_command "$1"

View File

@ -0,0 +1,7 @@
Bastille is a jail automation framework that allows you to
quickly create and manage FreeBSD jails.
The project focuses on secure defaults, automation and
repeatable templates.
WWW: https://bastillebsd.org

View File

@ -0,0 +1,23 @@
@sample %%ETCDIR%%/bastille.conf.sample %%ETCDIR%%/bastille.conf
bin/bastille
%%DATADIR%%/bootstrap.sh
%%DATADIR%%/cmd.sh
%%DATADIR%%/colors.pre.sh
%%DATADIR%%/console.sh
%%DATADIR%%/cp.sh
%%DATADIR%%/create.sh
%%DATADIR%%/destroy.sh
%%DATADIR%%/freebsd_dist_fetch.sh
%%DATADIR%%/htop.sh
%%DATADIR%%/list.sh
%%DATADIR%%/pkg.sh
%%DATADIR%%/restart.sh
%%DATADIR%%/service.sh
%%DATADIR%%/start.sh
%%DATADIR%%/stop.sh
%%DATADIR%%/sysrc.sh
%%DATADIR%%/template.sh
%%DATADIR%%/top.sh
%%DATADIR%%/update.sh
%%DATADIR%%/upgrade.sh
%%DATADIR%%/verify.sh