From 0df4d7180759596e75e2595fd8113a83ade86e4d Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 3 Apr 2025 00:06:03 -0600 Subject: [PATCH] template: Fix path when using line in file --- usr/local/share/bastille/template.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/template.sh b/usr/local/share/bastille/template.sh index 8e97feeb..c6fa43a4 100644 --- a/usr/local/share/bastille/template.sh +++ b/usr/local/share/bastille/template.sh @@ -115,8 +115,8 @@ render() { } line_in_file() { - _line="${1}" - _file_path="${2}" + _line="${2}" + _file_path="${1}/${3}" if [ -f "${_file_path}" ]; then if ! grep -qxF "${_line}" "${_file_path}"; then echo "${_line}" >> "${_file_path}" @@ -393,7 +393,7 @@ for _jail in ${JAILS}; do continue ;; lif|lineinfile|line_in_file) - line_in_file "${_args}" + line_in_file "${bastille_jail_path}" "${_args}" continue ;; esac