Improve bastille/cp return status

This commit is contained in:
Jose
2020-07-31 04:07:58 -04:00
parent 3872f93063
commit 709f00a2ac
2 changed files with 8 additions and 2 deletions

View File

@@ -172,4 +172,5 @@ if [ -f "${SCRIPTPATH}" ]; then
else
bastille_colors_pre
echo -e "${COLOR_RED}${SCRIPTPATH} not found.${COLOR_RESET}" 1>&2
exit 1
fi

View File

@@ -61,6 +61,11 @@ fi
for _jail in ${JAILS}; do
bastille_jail_path="$(jls -j "${_jail}" path)"
echo -e "${COLOR_GREEN}[${_jail}]:${COLOR_RESET}"
cp -av "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}"
echo
# Add line break and return status
if cp -av "${CPSOURCE}" "${bastille_jail_path}/${CPDEST}"; then
echo
else
echo
false
fi
done