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