我们可以找到如下的地址的文件:
/etc/rc.local
我们可以编辑这个文件,比如:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
(sleep 20
python3 /home/liuxg/sensortag/bluepy/bluepy/sensordata.py) &
这里,我们先等待20秒,比如我们需要等待网路已经连接好了,我们再启动我们的服务。再直接运行我们的应用。