diff --git a/registry/scripts/registry.sh b/registry/scripts/registry.sh index 0120e969c515ea0290b593531e15e01a8cf3ae3d..80c8fbf725515de2aa22d78ae542cbf1f5801b26 100755 --- a/registry/scripts/registry.sh +++ b/registry/scripts/registry.sh @@ -30,6 +30,7 @@ if [ ! -d $conf_dir ] then # Init mkdir $conf_dir + ssh-keygen -P "" -f /root/.ssh/id_rsa else # Clean while read line @@ -49,6 +50,8 @@ do then date=$(date +%Y%m%d) res=$(grep "$line" $conf_file) + rIP=$(echo $line | cut -d ' ' -f 3) + line=$(echo $line | cut -d ' ' -f 1-2) if [ ! -z "$res" ] then # Update @@ -57,6 +60,7 @@ do # Add echo "$date $line" >> $conf_file fi + cat /root/.ssh/id_rsa.pub | netcat $rIP $port fi done