mirror of
https://github.com/hackacad/bastille.git
synced 2026-03-25 10:14:59 +01:00
Merge pull request #1360 from BastilleBSD/tschettervictor-patch-1
This commit is contained in:
@@ -69,17 +69,28 @@ if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
|
||||
fi
|
||||
|
||||
TARGET="${1}"
|
||||
if [ "$#" -eq 2 ]; then
|
||||
TARGET_FILENAME="${2}"
|
||||
else
|
||||
TARGET_FILENAME="jail.conf"
|
||||
fi
|
||||
FILE="${2}"
|
||||
|
||||
bastille_root_check
|
||||
set_target_single "${TARGET}"
|
||||
|
||||
if [ -z "${FILE}" ]; then
|
||||
FILE="jail.conf"
|
||||
else
|
||||
case "${FILE}" in
|
||||
rc|rc.conf)
|
||||
FILE="/root/etc/rc.conf"
|
||||
;;
|
||||
*)
|
||||
if [ ! -f "${bastille_jailsdir}/${TARGET}/${FILE}" ]; then
|
||||
error_exit "[ERROR]: File not found: ${FILE}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ -z "${EDITOR}" ]; then
|
||||
EDITOR=edit
|
||||
fi
|
||||
|
||||
"${EDITOR}" "${bastille_jailsdir}/${TARGET}/${TARGET_FILENAME}"
|
||||
"${EDITOR}" "${bastille_jailsdir}/${TARGET}/${FILE}"
|
||||
Reference in New Issue
Block a user