modified things in relaunch.sh, mvvm.sh and deploy.pl

This commit is contained in:
mischa 2021-05-02 12:23:58 +02:00
parent d5a21bfba8
commit 65c467a791
3 changed files with 13 additions and 2 deletions

View File

@ -25,7 +25,7 @@
# 2020/05/10 changed: includes all install sets, inline with sysupgrade
# 2020/05/22 changed: set the hosts password for the users
# 2020/05/24 changed: add staggered option to vm.conf, leave disable for now
# 2020/09/20 changed: add agentx option to vm.conf for OpenBSD 6.9
# 2020/09/20 changed: add agentx option to vm.conf for OpenBSD 7.0
# 2020/10/25 changes: doas.conf for pkill option, so it works again
# 2021/01/19 changes: add format of disk images in vm.conf (CVE-2010-3851), thanx Johan Finnved
#
@ -84,7 +84,7 @@ sub render_vm_conf {
printf $fh_vm "#\n# File generated by deploy.pl\n#\n";
printf $fh_vm "socket owner :%s\n", $conf{'conf'}{'VMDUSERS'};
printf $fh_vm "staggered start parallel 2 delay 90\n";
if ($_VERSION > 6.8) {
if ($_VERSION > 6.9) {
printf $fh_vm "agentx\n";
}
printf $fh_vm "\n";

View File

@ -40,6 +40,15 @@ if [ -f "/var/vmm/${instance}.qcow2" ]; then
cp /var/vmm/${instance}.qcow2 /var/vmm/${1}.qcow2
fi
if [ -f "/var/vmm/${1}.img" ]; then
echo -n "Size of img: "
ls -alh /var/vmm/${1}.img | awk '{print $5}'
if [ ! -f "/var/vmm/${1}.qcow2" ]; then
echo "vmctl create -i /var/vmm/${1}.img /var/vmm/${1}.qcow2"
vmctl create -i /var/vmm/${1}.img /var/vmm/${1}.qcow2 && pushover.pl -m "vmctl create ${1} done"
fi
fi
if [ -f "/var/vmm/${1}.qcow2" ]; then
echo -n "Size of qcow2: "
ls -alh /var/vmm/${1}.qcow2 | awk '{print $5}'

View File

@ -40,4 +40,6 @@ vmctl reload
vmctl start ${1}
sleep 30
echo "SUCCES! - deployed ${1}"
cp -v temlates/email-deployed.txt-redeploy templates/email-deployed.txt
notify.pl deployed ${1}
cp -v temlates/email-deployed.txt-orig templates/email-deployed.txt