export: support AUTO_RESTART of jail was auto-stopped

This commit is contained in:
tschettervictor
2025-12-14 14:53:06 -07:00
committed by GitHub
parent 7120232e70
commit 7d3db866bf

View File

@@ -74,6 +74,7 @@ opt_count() {
# Reset export options
AUTO=0
AUTO_RESTART=0
LIVE=0
GZIP_EXPORT=0
XZ_EXPORT=0
@@ -301,6 +302,7 @@ if checkyesno bastille_zfs_enable; then
elif check_target_is_running "${TARGET}"; then
if [ "${AUTO}" -eq 1 ]; then
bastille stop "${TARGET}"
AUTO_RESTART=1
else
info "\n[${TARGET}]:"
error_notify "[ERROR]: Jail is running."
@@ -513,6 +515,11 @@ jail_export() {
fi
exit 0
fi
# Restart if AUTO_RESTART=1
if [ "${AUTO_RESTART}" -eq 1 ]; then
bastille start "${TARGET}"
fi
}
jail_export