Skip to content

Commit

Permalink
Merge pull request #851 from BastilleBSD/revert-846-Exit-on-arg-not-set
Browse files Browse the repository at this point in the history
Revert "template: Exit when any ARG is not set"
  • Loading branch information
tschettervictor authored Feb 17, 2025
2 parents 44fc7a6 + 6f038ed commit b73b72d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions usr/local/share/bastille/template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ for _jail in ${JAILS}; do
_arg_name=$(get_arg_name "${_line}")
_arg_value=$(get_arg_value "${_line}" "$@")
if [ -z "${_arg_value}" ]; then
error_exit "No value provided for arg: ${_arg_name}"
warn "No value provided for arg: ${_arg_name}"
fi
ARG_REPLACEMENTS="${ARG_REPLACEMENTS} -e 's/\${${_arg_name}}/${_arg_value}/g'"
done < "${bastille_template}/ARG"
Expand All @@ -291,7 +291,7 @@ for _jail in ${JAILS}; do
_arg_name=$(get_arg_name "${_args}")
_arg_value=$(get_arg_value "${_args}" "$@")
if [ -z "${_arg_value}" ]; then
error_exit "No value provided for arg: ${_arg_name}"
warn "No value provided for arg: ${_arg_name}"
fi
# Build a list of sed commands like this: -e 's/${username}/root/g' -e 's/${domain}/example.com/g'
ARG_REPLACEMENTS="${ARG_REPLACEMENTS} -e 's/\${${_arg_name}}/${_arg_value}/g'"
Expand Down

0 comments on commit b73b72d

Please sign in to comment.