server-scripts/lxc-foreach

13 lines
182 B
Bash
Executable File

#!/bin/bash
lxc_root=/data/containers
for n in `lxc-ls`; do
name=n
r=$lxc_root/$n/rootfs
root=$r
c=$lxc_root/$n/config
config=$c
eval echo "\$ $1" 1>&2
eval "$1"
done