mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-25 06:55:46 +01:00
Merge pull request #1073 from BastilleBSD/tschettervictor-patch-2
This commit is contained in:
@@ -295,14 +295,17 @@ migrate_jail() {
|
||||
|
||||
# Destroy old jail if OPT_DESTROY=1
|
||||
if [ "${OPT_DESTROY}" -eq 1 ]; then
|
||||
bastille destroy -af "${_jail}"
|
||||
bastille destroy -afy "${_jail}"
|
||||
fi
|
||||
|
||||
# Remove archives
|
||||
migrate_cleanup "${_jail}" "${_user}" "${_host}" "${_port}"
|
||||
|
||||
# Start new jail if AUTO=1
|
||||
if [ "${AUTO}" -eq 1 ]; then
|
||||
# Reconcile LIVE and AUTO, ensure only one side is running
|
||||
if [ "${AUTO}" -eq 1 ] && [ "${LIVE}" -eq 0 ]; then
|
||||
${_sshpass_cmd} ssh -p ${_port} ${_opt_ssh_key} ${_user}@${_host} ${OPT_SU} bastille start "${_jail}"
|
||||
elif [ "${AUTO}" -eq 1 ] && [ "${LIVE}" -eq 1 ]; then
|
||||
bastille stop "${_jail}"
|
||||
${_sshpass_cmd} ssh -p ${_port} ${_opt_ssh_key} ${_user}@${_host} ${OPT_SU} bastille start "${_jail}"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user