From 9740c39dac58e538327a18affd0ac4c9ccd0522d Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 18 Jan 2021 14:41:09 +0100 Subject: [PATCH] Rolle: proxmox Keine Fehlermeldung mehr wenn VMs schon laufen --- roles/mgrote.proxmox/templates/start_pools.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/mgrote.proxmox/templates/start_pools.sh b/roles/mgrote.proxmox/templates/start_pools.sh index 7856310d..7d4c26ad 100644 --- a/roles/mgrote.proxmox/templates/start_pools.sh +++ b/roles/mgrote.proxmox/templates/start_pools.sh @@ -1,8 +1,8 @@ #! /bin/bash {% raw %} # starte/stoppe Container -sudo pvesh get /pools/$1 | sed -r 's#(,)#\n#g;s#\│##g;s#─##g;s#┴##g;s#└##g;s#┘##g;s#╞##g;s#╪##g;s#═##g;s#╡##g;s#\{##g;s#\}##g;s#\"*\"##g;s#\[##g;s#\]##g;s#id\:##g' | grep -E 'lxc/[[:digit:]]{3}' | sed -r 's#(lxc\/)([0-9]{3})#\2#g' | sudo xargs -i --verbose pct "$2" {} +sudo pvesh get /pools/$1 | sed -r 's#(,)#\n#g;s#\│##g;s#─##g;s#┴##g;s#└##g;s#┘##g;s#╞##g;s#╪##g;s#═##g;s#╡##g;s#\{##g;s#\}##g;s#\"*\"##g;s#\[##g;s#\]##g;s#id\:##g' | grep -E 'lxc/[[:digit:]]{3}' | sed -r 's#(lxc\/)([0-9]{3})#\2#g' | sudo xargs -i sh -c "pct "$2" {} || true" # starte/stoppe VMs -sudo pvesh get /pools/$1 | sed -r 's#(,)#\n#g;s#\│##g;s#─##g;s#┴##g;s#└##g;s#┘##g;s#╞##g;s#╪##g;s#═##g;s#╡##g;s#\{##g;s#\}##g;s#\"*\"##g;s#\[##g;s#\]##g;s#id\:##g' | grep -E 'qemu/[[:digit:]]{3}' | sed -r 's#(qemu\/)([0-9]{3})#\2#g' | sudo xargs -i --verbose qm "$2" {} +sudo pvesh get /pools/$1 | sed -r 's#(,)#\n#g;s#\│##g;s#─##g;s#┴##g;s#└##g;s#┘##g;s#╞##g;s#╪##g;s#═##g;s#╡##g;s#\{##g;s#\}##g;s#\"*\"##g;s#\[##g;s#\]##g;s#id\:##g' | grep -E 'qemu/[[:digit:]]{3}' | sed -r 's#(qemu\/)([0-9]{3})#\2#g' | sudo xargs -i sh -c "qm "$2" {} || true" {% endraw %}