diff --git a/tools/aabook.monitor.sh b/tools/aabook.monitor.sh new file mode 100644 index 0000000..515caee --- /dev/null +++ b/tools/aabook.monitor.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# 远程服务器信息 +REMOTE_SERVER="170.106.191.35" +REMOTE_USER="root" + +# 执行远程命令 +RESULT=$(ssh $REMOTE_USER@$REMOTE_SERVER "cd ~/resources/aabook/src/ && python3 ./check_status.py") + +# 检查远程命令执行结果 +if [ $? -eq 0 ]; then + # 执行本地脚本并将远程命令结果作为输入 + python3 ./send_to_wecom.py "$RESULT" +else + echo "远程命令执行失败" +fi + \ No newline at end of file