#!/bin/bash
for i in `cat ./iplist.ini `
do
echo $i
scp ./MonitorProcess.sh $i:/home/haoren/
ssh $i "(echo '*/5 * * * * /home/haoren/MonitorProcess.sh' ;crontab -l) |crontab"
echo "Synchronization is complete."
done
#!/bin/bash
for i in `cat ./iplist.ini `
do
echo $i
scp ./MonitorProcess.sh $i:/home/haoren/
ssh $i "(echo '*/5 * * * * /home/haoren/MonitorProcess.sh' ;crontab -l) |crontab"
echo "Synchronization is complete."
done