common: Add function to escape special

This commit is contained in:
tschettervictor
2025-05-20 12:10:35 -06:00
committed by GitHub
parent 256e40e03d
commit af62e9ab0b

View File

@@ -93,6 +93,19 @@ warn() {
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
bastille_running_jobs() {
@@ -544,4 +557,4 @@ checkyesno() {
esac
}
set_bastille_mountpoints
set_bastille_mountpoints