Skip to content

Commit

Permalink
Merge pull request #9 from fkj-src/main
Browse files Browse the repository at this point in the history
增加aciton保活失败tg推送
  • Loading branch information
frankiejun authored Nov 8, 2024
2 parents 68ee695 + c158907 commit ce4816d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion revive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,10 @@ for info in "${hosts_info[@]}"; do

output=$(./toserv.sh $user $host $port $pass "$script")

echo "output:$output"
if echo "$output" | grep -q "更新完毕"; then
echo "登录成功"
else
echo "登录失败"
./tgsend.sh "主机:$host,用户名:$user,登录失败请检查!"
fi
done
2 changes: 1 addition & 1 deletion toserv.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/expect -f

set timeout -1
set timeout 5

# 获取参数
set REMOTE_USER [lindex $argv 0]
Expand Down

0 comments on commit ce4816d

Please sign in to comment.