20 lines
361 B
Bash
Executable File
20 lines
361 B
Bash
Executable File
#!/bin/bash
|
|
|
|
date > /testfile.txt
|
|
|
|
Source=/testfile.txt
|
|
Targets=
|
|
Targets="${Targets} cvtt@cloud21.cvtt.vpn:/tmp/"
|
|
Targets="${Targets} cvtt@hs01.cvtt.vpn:/tmp/"
|
|
|
|
|
|
for tgt in ${Targets}
|
|
do
|
|
Cmd="/usr/bin/rsync -ahv"
|
|
Cmd+=" -e 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null'"
|
|
Cmd+=" ${Source} ${tgt}"
|
|
echo $Cmd
|
|
eval $Cmd
|
|
done
|
|
|