Check/update bastille config parameters on runtime
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
======================
|
======================
|
||||||
Version Description
|
Version Description
|
||||||
|
|
||||||
|
1.3.01......Check/update bastille config parameters on runtime.
|
||||||
1.3.00......Code improvements/fixes and dashboard cosmetic changes.
|
1.3.00......Code improvements/fixes and dashboard cosmetic changes.
|
||||||
1.2.31......Minor cosmetic/wording changes.
|
1.2.31......Minor cosmetic/wording changes.
|
||||||
1.2.30......Add auto and live export modes, add ZST compression support.
|
1.2.30......Add auto and live export modes, add ZST compression support.
|
||||||
|
|||||||
Regular → Executable
+19
@@ -1516,6 +1516,25 @@ update_config()
|
|||||||
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_decompress_zst_options="-k -d -c -v"
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_decompress_zst_options="-k -d -c -v"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check/append pkgbase parameters.
|
||||||
|
if ! grep -qw 'bastille_pkgbase_packages=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_pkgbase_packages="base-jail"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check/append monitor parameters.
|
||||||
|
if ! grep -qw 'bastille_monitor_cron_path=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_monitor_cron_path="/usr/local/etc/cron.d/bastille-monitor"
|
||||||
|
fi
|
||||||
|
if ! grep -qw 'bastille_monitor_cron=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_monitor_cron="*/5 * * * * root /usr/local/bin/bastille monitor ALL >/dev/null 2>&1"
|
||||||
|
fi
|
||||||
|
if ! grep -qw 'bastille_monitor_logfile=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_monitor_logfile="\${bastille_logsdir}/monitor.log"
|
||||||
|
fi
|
||||||
|
if ! grep -qw 'bastille_monitor_healthchecks=' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} bastille_monitor_healthchecks=""
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove deprecated parameters based on minimum version.
|
# Remove deprecated parameters based on minimum version.
|
||||||
if grep -qw 'bastille_jail_interface' ${INSTALLPATH}/${BASTILLECONF}; then
|
if grep -qw 'bastille_jail_interface' ${INSTALLPATH}/${BASTILLECONF}; then
|
||||||
sysrc -f ${INSTALLPATH}/${BASTILLECONF} -x bastille_jail_interface
|
sysrc -f ${INSTALLPATH}/${BASTILLECONF} -x bastille_jail_interface
|
||||||
|
|||||||
@@ -9,12 +9,12 @@ bastille_logsdir="${bastille_prefix}/logs"
|
|||||||
bastille_pf_conf="${bastille_prefix}/pf.conf"
|
bastille_pf_conf="${bastille_prefix}/pf.conf"
|
||||||
bastille_sharedir="/usr/local/share/bastille"
|
bastille_sharedir="/usr/local/share/bastille"
|
||||||
bastille_bootstrap_archives="base"
|
bastille_bootstrap_archives="base"
|
||||||
|
bastille_pkgbase_packages="base-jail"
|
||||||
bastille_tzdata="etc/UTC"
|
bastille_tzdata="etc/UTC"
|
||||||
bastille_resolv_conf="/etc/resolv.conf"
|
bastille_resolv_conf="/etc/resolv.conf"
|
||||||
bastille_url_freebsd="http://ftp.freebsd.org/pub/FreeBSD/releases/"
|
bastille_url_freebsd="http://ftp.freebsd.org/pub/FreeBSD/releases/"
|
||||||
bastille_url_hardenedbsd="https://installers.hardenedbsd.org/pub/"
|
bastille_url_hardenedbsd="https://installers.hardenedbsd.org/pub/"
|
||||||
bastille_url_midnightbsd="https://www.midnightbsd.org/ftp/MidnightBSD/releases/"
|
bastille_url_midnightbsd="https://www.midnightbsd.org/ftp/MidnightBSD/releases/"
|
||||||
bastille_url_midnightbsd="https://www.midnightbsd.org/ftp/MidnightBSD/releases/"
|
|
||||||
bastille_zfs_enable=""
|
bastille_zfs_enable=""
|
||||||
bastille_zfs_zpool=""
|
bastille_zfs_zpool=""
|
||||||
bastille_zfs_prefix="bastille"
|
bastille_zfs_prefix="bastille"
|
||||||
@@ -23,13 +23,15 @@ bastille_compress_xz_options="-0 -v"
|
|||||||
bastille_decompress_xz_options="-c -d -v"
|
bastille_decompress_xz_options="-c -d -v"
|
||||||
bastille_compress_gz_options="-1 -v"
|
bastille_compress_gz_options="-1 -v"
|
||||||
bastille_decompress_gz_options="-k -d -c -v"
|
bastille_decompress_gz_options="-k -d -c -v"
|
||||||
|
bastille_compress_zst_options="-3 -v"
|
||||||
|
bastille_decompress_zst_options="-k -d -c -v"
|
||||||
bastille_network_vnet_type="if_bridge"
|
bastille_network_vnet_type="if_bridge"
|
||||||
bastille_network_loopback=""
|
bastille_network_loopback=""
|
||||||
bastille_network_pf_ext_if="ext_if"
|
bastille_network_pf_ext_if="ext_if"
|
||||||
bastille_network_pf_table="jails"
|
bastille_network_pf_table="jails"
|
||||||
bastille_network_shared=""
|
bastille_network_shared=""
|
||||||
bastille_network_gateway=""
|
bastille_network_gateway=""
|
||||||
bastille_network_gateway6=""
|
bastille_network_gateway6=""
|
||||||
bastille_template_base="default/base"
|
bastille_template_base="default/base"
|
||||||
bastille_template_empty=""
|
bastille_template_empty=""
|
||||||
bastille_template_thick="default/thick"
|
bastille_template_thick="default/thick"
|
||||||
@@ -37,3 +39,7 @@ bastille_template_clone="default/clone"
|
|||||||
bastille_template_thin="default/thin"
|
bastille_template_thin="default/thin"
|
||||||
bastille_template_vnet="default/vnet"
|
bastille_template_vnet="default/vnet"
|
||||||
bastille_template_vlan="default/vlan"
|
bastille_template_vlan="default/vlan"
|
||||||
|
bastille_monitor_cron_path="/usr/local/etc/cron.d/bastille-monitor"
|
||||||
|
bastille_monitor_cron="*/5 * * * * root /usr/local/bin/bastille monitor ALL >/dev/null 2>&1"
|
||||||
|
bastille_monitor_logfile="${bastille_logsdir}/monitor.log"
|
||||||
|
bastille_monitor_healthchecks=""
|
||||||
|
|||||||
Reference in New Issue
Block a user