for i in $(lxc-ls -1|sort|uniq); do
[ "$(lxc-info -n $i | grep state| awk '{print $2;}' )" != "RUNNING" ] && lxc-start -d -n $i || :
for i in $(lxc-ls -1|sort|uniq); do
[ "$(lxc-info -n $i | grep state| awk '{print $2;}' )" != "RUNNING" ] && lxc-start -d -n $i || :
for i in $(lxc-ls -1|sort|uniq); do
[ "$(lxc-info -n $i | grep state| awk '{print $2;}' )" != "STOPPED" ] && lxc-stop -n $i
for i in $(lxc-ls -1|sort|uniq); do
[ "$(lxc-info -n $i | grep state| awk '{print $2;}' )" != "STOPPED" ] && lxc-stop -n $i