Match exact jail name for start/stop commands, don't allow for dots during create

This commit is contained in:
Jose
2019-11-19 13:10:24 -04:00
parent 4fb2cc1247
commit 4eb5d1b9ba
4 changed files with 9 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ destroy_jail() {
bastille_jail_base="${bastille_jailsdir}/${NAME}" ## dir
bastille_jail_log="${bastille_logsdir}/${NAME}_console.log" ## file
if [ $(jls name | grep ${NAME}) ]; then
if [ $(jls name | grep -w "${NAME}") ]; then
echo -e "${COLOR_RED}Jail running.${COLOR_RESET}"
echo -e "${COLOR_RED}See 'bastille stop ${NAME}'.${COLOR_RESET}"
exit 1