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 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[@]}" &
|
||||||
|
|
Loading…
Reference in New Issue