婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > expect自動檢測并重啟另外一臺服務(wù)器上的程序代碼

expect自動檢測并重啟另外一臺服務(wù)器上的程序代碼

熱門標(biāo)簽:陜西便宜電銷機(jī)器人軟件 電話機(jī)器人每天搜索多少次 海口智能語音電銷機(jī)器人好用嗎 昆明電話外呼系統(tǒng)好么 衡水外呼線路解決 外呼系統(tǒng)一天耗費(fèi)多少流量 艾比利外呼系統(tǒng) 杞縣地圖標(biāo)注app 免費(fèi)門店地圖標(biāo)注注冊入駐

[s005 you] # cat haproxy_expect

復(fù)制代碼 代碼如下:

#!/usr/bin/expect
set ssh_user "fivetrees"
set password "123456"
spawn ssh -i /root/.ssh/$ssh_user Server004.xd.com
expect_before "no)?" {
send "yes\r" }
sleep 0.5
expect "Enter passphrase for key*"
send "$password\r"
expect "*#"
send "/tmp/haproxy.sh\r"
expect "*#"
send "echo\r"
exit

[s004 him] # cat haproxy.sh

復(fù)制代碼 代碼如下:

#!/bin/bash
Thread=`ps -ef | grep haproxy | grep -v haproxy.sh | grep -v grep`
if [ -z "$Thread" ]
then
        /tmp/haproxy_expect
fi

[s004 him] # cat haproxy_expect

復(fù)制代碼 代碼如下:

#!/usr/bin/expect
set ssh_user "fivetrees"
set password "123456"
spawn ssh -i /root/.ssh/$ssh_user Server005.xd.com
expect_before "no)?" {
send "yes\r" }
sleep 0.5
expect "Enter passphrase for key*"
send "$password\r"
expect "*#"
send "/usr/local/haproxy/sbin/haproxy -f /usr/local/haproxy/haproxy.cfg\r"
expect "*#"
send "echo\r"
exit

標(biāo)簽:南京 西寧 臨滄 海口 營口 宿遷 昌都 泰安

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《expect自動檢測并重啟另外一臺服務(wù)器上的程序代碼》,本文關(guān)鍵詞  expect,自動檢測,并,重啟,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《expect自動檢測并重啟另外一臺服務(wù)器上的程序代碼》相關(guān)的同類信息!
  • 本頁收集關(guān)于expect自動檢測并重啟另外一臺服務(wù)器上的程序代碼的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 堆龙德庆县| 宜丰县| 高密市| 平邑县| 盈江县| 宣威市| 洪江市| 沾化县| 武夷山市| 涟水县| 洛浦县| 陆丰市| 曲周县| 开封县| 工布江达县| 开封县| 大连市| 奉贤区| 海南省| 遵义市| 新昌县| 姚安县| 曲阳县| 鹤壁市| 酉阳| 台北市| 满城县| 上林县| 汶川县| 白银市| 高唐县| 汉寿县| 宁明县| 平江县| 高唐县| 白城市| 壤塘县| 鸡东县| 广东省| 新巴尔虎左旗| 应城市|