I installed octoprint to my raspberry pi earlier this year in order to control my 3d printers.
I've been able to make the pi control 2 printers at once using octoprint. Also I've added a second camera (USB) to view the second printer. I managed to find a way to start the second camera and edit octoprint to see the difference in the two.
My only problem is every time I start my raspberry pi up again I have to change to different a working directory:
then this to start the second camera:
./mjpg_streamer -i "./input_raspicam.so -fps 5" -o "./output_http.so -p 8090"&
I want to be able to write a script to start the camera on boot so I don't have to ssh to my raspberry, login, and send the commands every day. I've found a lot about writing boot scripts but nothing about changing the working directory inside it.
I've been using this to write start scripts (unsuccessfully):
sudo nano /etc/init.d/startsecondcamera