3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-26 05:49:27 +01:00
pbot/applets/compiler_vm/host/devices/add-serials

16 lines
333 B
Plaintext
Raw Normal View History

#!/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