From 1bb7fe1db4d35de9be55dfe53b47440e9c09a523 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Tue, 6 May 2025 15:27:34 -0600 Subject: [PATCH] Update migrate.sh --- usr/local/share/bastille/migrate.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr/local/share/bastille/migrate.sh b/usr/local/share/bastille/migrate.sh index e7cbbb61..276e197d 100644 --- a/usr/local/share/bastille/migrate.sh +++ b/usr/local/share/bastille/migrate.sh @@ -122,7 +122,7 @@ migrate_cleanup() { local _host="${3}" # Remove archive files from local and remote system - ssh ${_user}@${_host} sudo rm -f ${_remote_bastille_migratedir}/${_jail}_*.* + ssh ${_user}@${_host} sudo rm -f "${_remote_bastille_migratedir}/${_jail}_*.*" rm -f ${bastille_migratedir}/${_jail}_*.* } @@ -174,7 +174,7 @@ migrate_jail() { info "\nAttempting to migrate jail to remote system..." local _file="$(find "${bastille_migratedir}" -maxdepth 1 -type f | grep -Eo "${_jail}_.*\.xz$" | head -n1)" - local _file_sha256="$(echo ${_file} | sed 's/\.*/.sha256/')" + local _file_sha256="$(echo ${_file} | sed 's/\..*/.sha256/')" # Send sha256 if ! scp ${bastille_migratedir}/${_file_sha256} ${_user}@${_host}:${_remote_bastille_migratedir}; then @@ -198,7 +198,7 @@ migrate_jail() { info "\nAttempting to migrate jail to remote system..." local _file="$(find "${bastille_migratedir}" -maxdepth 1 -type f | grep -Eo "${_jail}_.*\.txz$" | head -n1)" - local _file_sha256="$(echo ${_file} | sed 's/\.*/.sha256/')" + local _file_sha256="$(echo ${_file} | sed 's/\..*/.sha256/')" # Send sha256 if ! scp ${bastille_migratedir}/${_file_sha256} ${_user}@${_host}:${_remote_bastille_migratedir}; then