diff --git a/usr/local/share/bastille/export.sh b/usr/local/share/bastille/export.sh index 5a7f4f0d..a133554c 100644 --- a/usr/local/share/bastille/export.sh +++ b/usr/local/share/bastille/export.sh @@ -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