-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.

New contributor
Reaghan Pius is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • 3
    Why do you want to run an install script at every startup? You would normally install just once! – CoderMike Feb 11 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 – Reaghan Pius Feb 12 at 12:31
  • What happens when you enter 'cd RPi_Cam_Web_Interface' then './start.sh' ? – CoderMike Feb 12 at 13:56
  • when entered ./start.sh it just skips to the next line without executing anything – Reaghan Pius Feb 12 at 17:53
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.

New contributor
Reaghan Pius is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Seems like this would only run when you log in, not when you boot. – Glen Yates Feb 13 at 17:41
-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>
  • 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 at 22:16
  • I think the OP has misunderstood how RPi-Cam-Web-Interface works. – CoderMike Feb 12 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&

Your Answer

Reaghan Pius is a new contributor. Be nice, and check out our Code of Conduct.

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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