mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-17 07:42:10 +01:00
Update common.sh
This commit is contained in:
@@ -93,19 +93,6 @@ warn() {
|
|||||||
echo -e "${COLOR_YELLOW}$*${COLOR_RESET}"
|
echo -e "${COLOR_YELLOW}$*${COLOR_RESET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
escape_special_characters() {
|
|
||||||
|
|
||||||
# Escape special charcters for jail.conf files
|
|
||||||
# Only "." for now
|
|
||||||
|
|
||||||
local _string="${1}"
|
|
||||||
|
|
||||||
_escaped_string="$(echo ${_string} | sed 's#\.#\\\.#g')"
|
|
||||||
|
|
||||||
echo "${_escaped_string}"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# Parallel mode, don't exceed process limit
|
# Parallel mode, don't exceed process limit
|
||||||
bastille_running_jobs() {
|
bastille_running_jobs() {
|
||||||
|
|
||||||
@@ -517,6 +504,19 @@ EOF
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
parse_value_jail_conf() {
|
||||||
|
|
||||||
|
# Escape special charcters for compatability with jail.conf files
|
||||||
|
# Only "." for now
|
||||||
|
|
||||||
|
local _string="${1}"
|
||||||
|
|
||||||
|
_escaped_string="$(echo ${_string} | sed 's#\.#\\\.#g')"
|
||||||
|
|
||||||
|
echo "${_escaped_string}"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
validate_netconf() {
|
validate_netconf() {
|
||||||
|
|
||||||
# Add default 'bastille_network_vnet_type' on old config file
|
# Add default 'bastille_network_vnet_type' on old config file
|
||||||
|
|||||||
Reference in New Issue
Block a user