summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormischa <mischa@rx.high5.nl>2021-05-02 12:23:58 +0200
committermischa <mischa@rx.high5.nl>2021-05-02 12:23:58 +0200
commit65c467a7914869fe1d1725647acaf1cb6ccc53da (patch)
tree36dfd41f213e1c46f984825b890c2bdb2a9828ef
parentd5a21bfba8ff7219b613da05f36f5bf6868f03ab (diff)
modified things in relaunch.sh, mvvm.sh and deploy.pl
-rwxr-xr-xdeploy.pl4
-rwxr-xr-xmvvm.sh9
-rwxr-xr-xrelaunch.sh2
3 files changed, 13 insertions, 2 deletions
diff --git a/deploy.pl b/deploy.pl
index 5bf558b..4a4cc95 100755
--- a/deploy.pl
+++ b/deploy.pl
@@ -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";
diff --git a/mvvm.sh b/mvvm.sh
index 5a36704..45cff8d 100755
--- a/mvvm.sh
+++ b/mvvm.sh
@@ -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}'
diff --git a/relaunch.sh b/relaunch.sh
index 987e430..3a65f31 100755
--- a/relaunch.sh
+++ b/relaunch.sh
@@ -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