Bail out when you try to apply a template to a container that is not started.

This commit is contained in:
Lars Engels
2019-12-11 21:17:09 +01:00
parent 5b11f81a1b
commit a57ae3ff46

View File

@@ -65,6 +65,11 @@ if [ ! -d "${bastille_templatesdir}/${TEMPLATE}" ]; then
exit 1
fi
if [ -z "${JAILS}" ]; then
echo -e "${COLOR_RED}Container ${TARGET} is not running.${COLOR_RESET}"
exit 1
fi
## global variables
bastille_template=${bastille_templatesdir}/${TEMPLATE}
for _jail in ${JAILS}; do