mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-27 21:22:36 +01:00
16 lines
333 B
Bash
Executable File
16 lines
333 B
Bash
Executable File
#!/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
|