saary
Posts: 4
Joined: Thu Jan 03, 2013 8:28 am

rc.local

Sat Aug 15, 2015 6:48 pm

hi,
i'm new to all of this. i have raspberry 2 b. i installed blynk and it is working.

i want to start blynk at reboot so i added

Code: Select all

./blynk-library/linux/blynk --token=<my token> &
in rc.local

when i run

Code: Select all

sudo /etc/init.d/rc.local start
it works. but if i reboot. it doesn't work

i have already made /etc/rc.local executable

please advice
thank you

User avatar
rpdom
Posts: 17170
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: rc.local

Sat Aug 15, 2015 6:58 pm

You need to put the full path of the file name.

You can't have

Code: Select all

./blynk-library/linux/blynk
in /etc/rc.local because rc.local usually gets run with the working directory set to "/", but when you run

Code: Select all

sudo /etc/init.d/rc.local start
the working directory will be wherever you are at the time - probably /home/pi ?

So what you'd need is

Code: Select all

/home/pi/blynk-library/linux/blynk --token=<my token> &

saary
Posts: 4
Joined: Thu Jan 03, 2013 8:28 am

Re: rc.local

Sat Aug 15, 2015 7:09 pm

Damn, you nailed it.

thank you very much

Return to “Raspberry Pi OS”