remove cruft; moved to sbin
This commit is contained in:
35
usr/local/sbin/bbsd-start
Executable file
35
usr/local/sbin/bbsd-start
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
# (christer.edwards@gmail.com)
|
||||
# start jail
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
printf "Required: jail name(s)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ARGS=$*
|
||||
|
||||
for jail in ${ARGS}; do
|
||||
PREFIX=/usr/local
|
||||
PLATFORM=${PREFIX}/bastille
|
||||
JAIL_BASE=${PLATFORM}/jails/${jail}
|
||||
|
||||
JAIL_ROOT=${JAIL_BASE}/root
|
||||
JAIL_CONF=${JAIL_BASE}/jail.conf
|
||||
PKGS_CONF=${JAIL_BASE}/pkgs.conf
|
||||
JAIL_JID=${JAIL_BASE}/${jail}.jid
|
||||
|
||||
err_msg() {
|
||||
printf "ERROR:\t$@\n"
|
||||
}
|
||||
|
||||
if [ ! -d ${JAIL_ROOT} ]; then
|
||||
err_msg "Jail (${jail}) does not exist(?)."
|
||||
elif [ -d ${JAIL_ROOT} ]; then
|
||||
jail -c -f "${JAIL_CONF}" -J "${JAIL_JID}" ${jail}
|
||||
pfctl -f /etc/pf.conf
|
||||
#if [ -s ${PKGS_CONF} ]; then
|
||||
# pkg -j ${jail} install -y $(cat ${PKGS_CONF})
|
||||
#fi
|
||||
fi
|
||||
done
|
||||
Reference in New Issue
Block a user