2018-10-15 03:40:11 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# sendmsg.sh
|
|
|
|
# sends a message to all conatiners
|
|
|
|
|
2018-09-17 21:18:36 +00:00
|
|
|
ADDRESSES=$(lxc list | cut -f 4 -d '|' \
|
|
|
|
| grep -Eo "[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9]*")
|
|
|
|
for ADDRESS in $ADDRESSES
|
|
|
|
do
|
|
|
|
echo "$1" | nc -q2 "$ADDRESS" 9090
|
|
|
|
done
|