diff options
Diffstat (limited to 'others/vm3/compute/shutdown.sh')
| -rwxr-xr-x | others/vm3/compute/shutdown.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/others/vm3/compute/shutdown.sh b/others/vm3/compute/shutdown.sh new file mode 100755 index 0000000..081499b --- /dev/null +++ b/others/vm3/compute/shutdown.sh | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | for vm in "$@"; do | ||
| 4 | sudo virsh shutdown "$vm" > /dev/null 2>&1 | ||
| 5 | printf "%-50s%10s\n" "Shutting down $vm..." $([[ $? -eq 0 ]] && echo "Successful" || echo "Failed") | ||
| 6 | done | ||
