From 86e7d5835879f4af1bf0a79d7b53d561d548da8c Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:48:17 -0700 Subject: [PATCH] Allow using template in custom directory --- usr/local/share/bastille/template.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index d9634f5a..51f3206e 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -188,15 +188,17 @@ case ${TEMPLATE} in ;; */*) if [ ! -d "${bastille_templatesdir}/${TEMPLATE}" ]; then - if [ ! -d ${TEMPLATE} ]; then error_exit "${TEMPLATE} not found." - else + else bastille_template=${TEMPLATE} - fi fi ;; *) - error_exit "Template name/URL not recognized." + if [ ! -f ${TEMPLATE}/Bastillefile ]; then + error_exit "${TEMPLATE} not found." + else + bastille_template=${TEMPLATE} + fi esac if [ -z "${JAILS}" ]; then