Stability tweaks

This commit is contained in:
David Thurstenson 2020-09-09 11:14:36 -05:00
parent 3c70bfa2fa
commit 8eb63f8b38
1 changed files with 10 additions and 3 deletions

View File

@ -6,7 +6,8 @@ declare -A cmdstring
declare -A uri declare -A uri
declare -a opts declare -a opts
cmdstring=([domain]="win10") cmdstring=([domain]="win10"
[startcmd]="virsh start ${cmdstring[domain]}")
uri=([remote]="qemu+ssh://kd-laptop/system" uri=([remote]="qemu+ssh://kd-laptop/system"
[remotespice]="spice://10.10.0.14:5900" [remotespice]="spice://10.10.0.14:5900"
@ -17,7 +18,8 @@ case "$(uname -n)" in
kd-laptop) kd-laptop)
cmdstring+=([cmd]="virt-viewer" cmdstring+=([cmd]="virt-viewer"
[uri]=${uri[local]} [uri]=${uri[local]}
[manuri]=${uri[local]}) [manuri]=${uri[local]}
[fullstartcmd]=${cmdstring[startcmd]})
opts=("--connect=${cmdstring[uri]}" opts=("--connect=${cmdstring[uri]}"
"--wait" "--wait"
"--reconnect" "--reconnect"
@ -27,7 +29,8 @@ case "$(uname -n)" in
*) *)
cmdstring+=([cmd]="remote-viewer" cmdstring+=([cmd]="remote-viewer"
[uri]=${uri[remotespice]} [uri]=${uri[remotespice]}
[manuri]=${uri[remote]}) [manuri]=${uri[remote]}
[fullstartcmd]="ssh kd-laptop ${cmdstring[startcmd]}")
opts=("${cmdstring[uri]}") opts=("${cmdstring[uri]}")
;; ;;
esac esac
@ -44,4 +47,8 @@ while :; do
shift shift
done done
if grep "${cmdstring[domain]}" <(virsh list --state-shutoff --name); then
${cmdstring[fullstartcmd]}
fi
${cmdstring[cmd]} "${opts[@]}" & ${cmdstring[cmd]} "${opts[@]}" &