批量安装nagios客户端

2015-11-05 0 938
批量安装nagios客户端
#!/bin/bash
#!/usr/bin/expect -f
#!/usr/bin/env bash
for line in `cat nagios.ip`
do
cmd1="scp ./nagios_client.sh  $line:~/"
cmd2="ssh root@$line"
expect -c "set timeout 20;
spawn $cmd1;
spawn $cmd2;
set timeout 1200;
expect "*@*";send "./nagios_client.sh\\r";
expect "*@*";send "exit\\r";
expect eof;"
done

遇见资源网 shell 批量安装nagios客户端 http://www.ox520.com/17210.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务