clone: Start both jails if AUTO=1

This commit is contained in:
tschettervictor
2025-04-26 18:38:00 -06:00
committed by GitHub
parent 938c9f6978
commit 37c55bde52

View File

@@ -363,13 +363,18 @@ clone_jail() {
update_jailconf
update_fstab "${TARGET}" "${NEWNAME}"
# Display the exist status
# Display exit status
if [ "$?" -ne 0 ]; then
error_exit "An error has occurred while attempting to clone '${TARGET}'."
else
info "Cloned '${TARGET}' to '${NEWNAME}' successfully."
fi
if [ "${AUTO}" -eq 1 ] || [ "${LIVE}" -eq 1 ]; then
# Start jails if AUTO=1 or LIVE=1
if [ "${AUTO}" -eq 1 ]; then
bastille start "${TARGET}"
bastille start "${NEWNAME}"
elif [ "${LIVE}" -eq 1 ]; then
bastille start "${NEWNAME}"
fi
}