Linux 设置延时启动的脚本

sz@raspberrypi:/opt/lhg $ cat start.sh 
#!/bin/bash

# Print the IP address
_IP=$(hostname -I) || true        
if [ "$_IP" ]; then
      printf "My IP address is %s\n" "$_IP"
fi
#(sleep 60 && sudo python3 /opt/lhg/FireTermMQTT_Pubish.py && sudo python3 /opt/lhg/FireTermMQTT_Subscribe.py) &
#(sleep 60 && sudo python3 /opt/lhg/mqtt_pub_sub.py) & 
(sleep 60 && sudo python3 /opt/lhg/mqtt_pub_sub_V1.0.py) & 
exit 0

 

posted @ 2024-09-03 16:51  小小仓鼠  阅读(146)  评论(0编辑  收藏  举报