msg MQTT message

main
zart 5 months ago
parent d1eefe3adf
commit f7bbca59a3

@ -8,6 +8,7 @@ port = 48835
print(os.getcwd()) print(os.getcwd())
with open("smp_coder/user.txt", "r") as f: with open("smp_coder/user.txt", "r") as f:
user_id = f.read().strip() user_id = f.read().strip()
user_id = user_id.split("=")[-1] user_id = user_id.split("=")[-1]
@ -64,3 +65,7 @@ client.loop_stop()
client.disconnect() client.disconnect()
print("收到响应,客户端退出。") print("收到响应,客户端退出。")
os.system("sudo myenv/bin/python3 smp_coder/extur_smp.py > logex.txt 2>&1 &")
print("启动树莓派拍照客户端成功。")

@ -52,12 +52,12 @@ else
fi fi
# 运行第二关的extur_smp.py # 运行第二关的extur_smp.py
nohup sudo $env_dir/bin/python3 smp_coder/extur_smp.py > logex.txt 2>&1 & #nohup sudo $env_dir/bin/python3 smp_coder/extur_smp.py > logex.txt 2>&1 &
if [ $? -eq 0 ]; then #if [ $? -eq 0 ]; then
echo "extur_smp.py 启动成功" # echo "extur_smp.py 启动成功"
else #else
echo "extur_smp.py 启动失败" # echo "extur_smp.py 启动失败"
fi #fi

Loading…
Cancel
Save