parent
347cd2ba6b
commit
cc5bf0d18c
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 转移文件
|
||||
|
||||
# 定义变量
|
||||
|
||||
cp ../smp_pc_20240625/download_and_execute.service ./
|
||||
|
||||
cp ../smp_pc_20240625/smp_init.sh ./
|
||||
|
||||
cp ../smp_pc_20240625/test_reload.sh ./
|
@ -0,0 +1,13 @@
|
||||
#!/usr/bin
|
||||
|
||||
sudo systemctl status download_and_execute.service
|
||||
|
||||
sudo systemctl stop download_and_execute.service
|
||||
|
||||
sudo systemctl disable download_and_execute.service
|
||||
|
||||
sudo rm /etc/systemd/system/download_and_execute.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
|
||||
echo "Service deleted successfully!"
|
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd /home/pi/smp_pc|| exit
|
||||
|
||||
|
||||
# 检测某个文件是否存在
|
||||
if [ -f smp_coder/user.txt ]; then
|
||||
echo "User file exists"
|
||||
else
|
||||
sudo myenv/bin/python smp_coder/mqtt_smp.py
|
||||
fi
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "MQTT SMP is running"
|
||||
else
|
||||
echo "MQTT SMP is not running"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo myenv/bin/python smp_coder/extur_smp.py
|
||||
|
||||
|
Loading…
Reference in new issue