Modify rc.local
/etc/rc.local add command before exit 0
script must have execute authority x
update-rc.d command
1 | sudo cp -f /home/pi/autowifi.sh /etc/init.d/ |
- add file or link to
/etc/init.d - add execute authority to script
- add user authority to script
- command add script to init start
- defaults [num] mean start sequence, the bigger the latter.
1 | update-rc.d [-n] [-f] name remove |
-ndo nothing, only preview.-fdelete link, even script remain in/etc/init.dNNexecute sequenceSSbegin sequenceKKend sequence