add startup only subset of hosts
This commit is contained in:
parent
ba749d5d11
commit
0b4852c8c4
1 changed files with 6 additions and 1 deletions
|
@ -4,7 +4,12 @@ if [ ! -f "$1" ]; then
|
|||
exit 1
|
||||
fi
|
||||
NUM=0
|
||||
for HOST in `cat "$1"`; do
|
||||
if [ ! -z "$2" ]; then
|
||||
HOSTS="$2"
|
||||
else
|
||||
HOSTS="`cat \"$1\"`"
|
||||
fi
|
||||
for HOST in $HOSTS; do
|
||||
>&2 echo starting up host $HOST
|
||||
ssh pi@$HOST "screen -dm bash stream.sh"
|
||||
NUM=$((NUM+1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue