GOker
Posts: 38
Joined: Wed May 15, 2013 9:40 pm
Location: Newbury. Uk

run terminal commands at boot

Sat Mar 29, 2014 6:57 pm

hi,

I've followed the instructions on this blog

http://blog.miguelgrinberg.com/post/how ... spberry-pi

to stream my pi noir , but when i reboot the pi, i have to put the commands in again.

is there a way to get them to run at boot?

i did put them into a file and chmod -x 'd it, but that dosn`'t seem to work manually either....or is there a better way to view the stream from my pi automatically after boot ?

thanks

User avatar
DougieLawson
Posts: 39302
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: run terminal commands at boot

Sat Mar 29, 2014 7:00 pm

Three ways
1. crontab -e
add an @reboot line that gets your command running
2. sudo nano /etc/rc.local
add the command terminated with an &
3. Create a /etc/init.d script and enable it with update-rc.d scriptname enable
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”