„vm_control.sh“ ändern

This commit is contained in:
Stephan 2022-02-06 20:46:52 +00:00
parent bb6b99530b
commit 536fe1e2aa

View file

@ -75,7 +75,7 @@ inotify_start() {
on)
if [ "$vm_host_status" = "shutdown" ]; then
echo "starte $vm ..."
synowebapi --exec api=SYNO.Virtualization.API.Guest.Action version=1 method=poweron runner=admin guest_name="$vm" 2>/dev/null
synowebapi --exec api=SYNO.Virtualization.API.Guest.Action version=1 method=poweron runner=admin guest_name="$vm" > /dev/null 2>&1
else
echo "VM $vm hat folgenden Status und kann nicht gestartet werden: $vm_host_status"
fi
@ -83,7 +83,7 @@ inotify_start() {
off)
if [ "$vm_host_status" = "running" ]; then
echo "beende $vm ..."
synowebapi --exec api=SYNO.Virtualization.API.Guest.Action version=1 method=shutdown runner=admin guest_name="$vm" 2>/dev/null
synowebapi --exec api=SYNO.Virtualization.API.Guest.Action version=1 method=shutdown runner=admin guest_name="$vm" > /dev/null 2>&1
else
echo "VM $vm hat folgenden Status und kann nicht beendet werden: $vm_host_status"
fi