destroy-cell
275 Bytes
#!/bin/bash
# Destroys an LXC cell with the specified name.
name=$1
spec=$2
nodes=${spec%+*}
mininet=${spec#*+}
cd $(dirname $0)
if [ $mininet -ge 1 ]; then
./destroy-node $name-n
fi
let n=1
while [ $n -le $nodes ]; do
./destroy-node $name-$n
let n=n+1
done