File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -207,15 +207,18 @@ for mname in $mnames; do
207207 # When done, clean up. Down the stack and remove the temp volume.
208208 wait $pid_src
209209 container_tool volume rm -f " $temp_vol_name " > /dev/null
210- wait $pid_data " $pid_db "
210+ wait $pid_data
211+ [[ -n $pid_db ]] && wait " $pid_db "
211212 # Update config before destroying the stack so we know the data mount point
212213 export_env_and_update_config " $mname "
213214 branchver=" $branchver " " $scr_dir /mdl-stop.sh" " $mname " -q
214215
215216 # Remove the local backup files when done, if they specified that option
216217 if $remove_when_done ; then
217218 echo Removing local backup files...
218- rm -fv " $MDL_BACKUP_DIR /$data_target " " $MDL_BACKUP_DIR /$src_target " " $MDL_BACKUP_DIR /$db_target "
219+ rm -fv " $MDL_BACKUP_DIR /$data_target " " $MDL_BACKUP_DIR /$src_target "
220+ [[ -n $db_target ]] && rm -fv " $MDL_BACKUP_DIR /$db_target "
221+ [[ -n $dbfiles_target ]] && rm -fv " $MDL_BACKUP_DIR /$dbfiles_target "
219222 fi
220223
221224 echo " Done restoring $ul$mname$rmul from $backup_source_desc backup set with label $ul$label$norm ."
You can’t perform that action at this time.
0 commit comments