From 8bcd5a915ab1de15f4c1d350b09818a562732950 Mon Sep 17 00:00:00 2001 From: Huang jinlong <33887488+longcat99@users.noreply.github.com> Date: Wed, 11 Dec 2024 06:04:50 +0800 Subject: [PATCH] Update mqtt_sub.sh --- general/longcat-openipc/mqtt_sub.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/general/longcat-openipc/mqtt_sub.sh b/general/longcat-openipc/mqtt_sub.sh index 37dec7b5..c6a0c3c5 100644 --- a/general/longcat-openipc/mqtt_sub.sh +++ b/general/longcat-openipc/mqtt_sub.sh @@ -20,4 +20,23 @@ mosquitto_sub -h "$host" \ echo "收到触发消息,执行脚本!" /usr/sbin/channels.sh 8 2000 # 在此处替换为实际要执行的脚本 fi + + if [[ "$message" == "1080" ]]; then + echo "收到触发消息,执行脚本!" + /root/1080.sh # 在此处替换为实际要执行的脚本 + fi + + if [[ "$message" == "3k" ]]; then + echo "收到触发消息,执行脚本!" + /root/3K.sh # 在此处替换为实际要执行的脚本 + fi + if [[ "$message" == "720" ]]; then + echo "收到触发消息,执行脚本!" + /root/720.sh # 在此处替换为实际要执行的脚本 + fi + if [[ "$message" == "4k" ]]; then + echo "收到触发消息,执行脚本!" + /root/4K.sh # 在此处替换为实际要执行的脚本 + fi + done