mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-19 16:51:00 +01:00
rc: Add comments
This commit is contained in:
@@ -9,18 +9,12 @@
|
||||
# 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.
|
||||
# Set it to "YES" to enable bastille.
|
||||
# bastille_conf (bool): Set to "/usr/local/etc/bastille/bastille.conf" by default.
|
||||
# Path to bastile.conf file. Used if bastille_rcorder="YES".
|
||||
# bastille_list (string): Set to "ALL" by default.
|
||||
# Space separated list of jails to start or "ALL" to start all
|
||||
# jails.
|
||||
# bastille_rcorder (bool): Set to "NO" by default.
|
||||
# Set it to "YES" to start all jails in order, defined by
|
||||
# rcorder(8). It starts all jails, except jails with "KEYWORD:
|
||||
# nostart" in jail.conf. Value of bastille_list is ignored in this
|
||||
# case, requires correct path to bastile.conf in bastille_conf
|
||||
# var.
|
||||
# Path to bastile.conf file.
|
||||
# bastille_startup_delay (bool): Set to 0 by default.
|
||||
# Set to a numerical value.
|
||||
# This is the delay between startup of each jail.
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
@@ -40,6 +34,7 @@ restart_cmd="bastille_stop && bastille_start"
|
||||
bastille_start()
|
||||
{
|
||||
local _jailsdir=$(. $bastille_conf; echo $bastille_jailsdir)
|
||||
# Sort jails by priority value
|
||||
local _priority_list=$(grep -Eo "^priority=\"[0-9]+\"$" ${_jailsdir}/*/boot.conf | sort -t '"' -k2 -n | awk -F'/' '{print $(NF-1)}')
|
||||
|
||||
for _jail in ${_priority_list}; do
|
||||
@@ -63,6 +58,7 @@ bastille_start()
|
||||
bastille_stop()
|
||||
{
|
||||
local _jailsdir=$(. $bastille_conf; echo $bastille_jailsdir)
|
||||
# Sort jails by priority value, in reverse order
|
||||
local _priority_list_rev=$(grep -Eo "^priority=\"[0-9]+\"$" ${_jailsdir}/*/boot.conf | sort -t '"' -k2 -nr | awk -F'/' '{print $(NF-1)}')
|
||||
|
||||
for _jail in ${_priority_list_rev}; do
|
||||
|
||||
Reference in New Issue
Block a user