mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-25 13:29:29 +01:00
compiler_vm: add-serials can be configured with env
This commit is contained in:
parent
d2269a3ca6
commit
df5e288aef
@ -1,2 +1,15 @@
|
||||
virsh attach-device --config pbot-vm serial-2.xml
|
||||
virsh attach-device --config pbot-vm serial-3.xml
|
||||
#!/bin/sh
|
||||
|
||||
DOMAIN="${PBOTVM_DOMAIN:-pbot-vm}"
|
||||
SERIAL="${PBOTVM_SERIAL:-5555}"
|
||||
HEART="${PBOTVM_HEART:-5556}"
|
||||
|
||||
install_serial() {
|
||||
file=$1 port=$2
|
||||
sed -i.1 "s/[\$]PORT[\$]/$port/" $file
|
||||
virsh attach-device --config $DOMAIN $file
|
||||
mv $file.1 $file
|
||||
}
|
||||
|
||||
install_serial serial-2.xml $SERIAL
|
||||
install_serial serial-3.xml $HEART
|
||||
|
@ -1,5 +1,5 @@
|
||||
<serial type='tcp'>
|
||||
<source mode='bind' host='127.0.0.1' service='5555' tls='no'/>
|
||||
<source mode='bind' host='127.0.0.1' service='$PORT$' tls='no'/>
|
||||
<protocol type='raw'/>
|
||||
<target port='2'/>
|
||||
</serial>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<serial type='tcp'>
|
||||
<source mode='bind' host='127.0.0.1' service='5556' tls='no'/>
|
||||
<source mode='bind' host='127.0.0.1' service='$PORT$' tls='no'/>
|
||||
<protocol type='raw'/>
|
||||
<target port='3'/>
|
||||
</serial>
|
||||
|
Loading…
Reference in New Issue
Block a user