mirror of
https://github.com/hackacad/bastille.git
synced 2026-03-23 02:15:21 +01:00
export: support AUTO_RESTART of jail was auto-stopped
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user