add scripts

This commit is contained in:
oscarz
2025-03-18 18:44:46 +08:00
parent 03b12ba4d4
commit e9843b652e

17
tools/aabook.monitor.sh Normal file
View File

@ -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