-1

I need to execute this command on the RASPBERRY PI bootup

cd RPi_Cam_Web_Interface && ./install.sh

and also follows dual ENTER keys with 5 seconds interval for each.

5
  • 4
    Why do you want to run an install script at every startup? You would normally install just once!
    – CoderMike
    Feb 11 '19 at 18:51
  • its an pi-Cam web interface , which shows live preview from the picam. but it is not starting at BOOT , even though the auto start is enabled Feb 12 '19 at 12:31
  • What happens when you enter 'cd RPi_Cam_Web_Interface' then './start.sh' ?
    – CoderMike
    Feb 12 '19 at 13:56
  • when entered ./start.sh it just skips to the next line without executing anything Feb 12 '19 at 17:53
  • 1
    This is a typical X/Y problem. Rather than asking about the workaround you invented, explain your original issue (pi-Cam web interface not starting at boot?) and see what alternative solutions are possible. Mar 6 '19 at 15:38
0

thanks People, i finally made it work by using this below command: \cd /home/pi/RPi_Cam_Web_Interface && ./install.sh and saved this as an Script and finally mentioned this script at the botom line of "sudo nano .bashrc" and now when i boot my pi,the software is installed freshly.

2
  • 1
    Seems like this would only run when you log in, not when you boot.
    – Glen Yates
    Feb 13 '19 at 17:41
  • Please accept your answer with a click on the tick on the left side. This will finish the question and it will not pop up again months for months.
    – Ingo
    Nov 24 '19 at 18:48
0

Try edit /etc/rc.local described in https://www.raspberrypi.org/documentation/linux/usage/rc-local.md IT May helps.

1
  • Please add so much information so that the answer can stand of it's own and the URL is just a reference. Nov 19 '20 at 14:36
-1

There are a few ways to execute a boot command. I use the rc.local file. sudo nano /etc/rc.local Add your shell command before the exit 0

for entering two enter keypress you can something along the lines of

cd RPi_Cam_Web_Interface && ./install.sh
echo | <yourfinecommandhere>
sleep 5s
echo | <yourfinecommandhere>
2
  • 1
    Please take note that using /etc/rc.local has limitations due to Compatibility with SysV. Following the recommendation of the developers from systemd you should avoid using it.
    – Ingo
    Feb 11 '19 at 22:16
  • 1
    I think the OP has misunderstood how RPi-Cam-Web-Interface works.
    – CoderMike
    Feb 12 '19 at 13:58
-1

I believe you could also use sudo crontab -e and just add a command with the absolute path (/usr/bin/foo). To run a command at boot and reboot in the background (so it doesn't prevent pi from continuing boot), add @reboot /usr/bin/foo&

1
  • No comment on why this is a downvoted method?
    – pcs3rd
    Mar 11 '19 at 0:56
-1

Add theat command in .bashrc file and it will do

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.