Commits

Andriy Kornatskyy committed 2020a80

Renamed lxc-halt to lxc-shutdown due to name conflict with /usr/bin/lxc-halt

Comments (0)

Files changed (1)

lxc-halt

-#!/bin/bash
-
-name=$1
-timeout=15
-
-if [ -z "`lxc-info -n $name | grep RUNNING`" ]; then
-    exit 0
-fi
-
-ssh $name halt &
-
-while [ $timeout -gt 0 ]
-do
-    timeout=$[$timeout-1];sleep 1
-    if [ ! -z "`lxc-info -n $name | grep STOPPED`" ]; then
-        exit 0
-    fi
-done
-
-lxc-stop -n $name
-lxc-wait -n $name -s 'STOPPED'