added autostart-all and autostop-all
[public/kvm-scripts.git] / kill.sh
1 #!/bin/bash
2 if [ $# -lt 1 ] ; then
3         echo "$0 <machine-conf>"
4         exit
5 fi
6 if [ ! -f $1 ] ; then
7         echo "<machine conf> does not exists at $1";
8         exit
9 fi
10 . $1
11 if [ ! -f _pids/$NAME ] ; then
12         echo "machine $NAME is not running";
13         exit
14 fi
15 . _run/common.sh
16 kill $( cat _pids/$NAME ) 
17 rm _pids/$NAME