mirror of
https://github.com/hackacad/bastille.git
synced 2026-01-04 03:33:41 +01:00
common: Add function to escape special
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user