server-scripts/lxc-foreach

13 lines
179 B
Plaintext
Raw Permalink Normal View History

2018-09-13 07:43:21 +00:00
#!/usr/bin/env bash
2014-10-19 15:27:33 +00:00
2018-09-13 07:43:21 +00:00
lxc_root=/lxc/
2014-10-19 15:27:33 +00:00
for n in `lxc-ls`; do
name=n
2015-04-13 11:40:32 +00:00
r=$lxc_root/$n/rootfs
2014-10-19 15:27:33 +00:00
root=$r
2015-04-13 11:40:32 +00:00
c=$lxc_root/$n/config
2014-10-19 15:27:33 +00:00
config=$c
2015-01-10 07:40:10 +00:00
eval echo "\$ $1" 1>&2
2014-10-19 15:27:33 +00:00
eval "$1"
done