raspberry pi, start a script from another PC, Server

0

I've got a server (raspberry PI 3 "A") which functions as a webserver. Additional I've got a client (raspberry PI 3 "B") with a camera connected. I've created a script on the client, which creates an image of the camera and then sends it automatically to a volume share of the server.
With a simple <img> HTML tag I want to show the image on the website.
Now I have to manually start the script, which triggers the camera.

How can I start a script from the server(webserver) which triggers the script from the client automatically?
I tried to do it with sshpass. Unfortunately that did not work.

How would it work via SSH PASS or what else is a useful way?*

Greg

Posted 2017-12-24T11:05:16.920

Reputation: 1

Answers

0

I am sure you could approach this a bit easier:

  • Nothing stops you from running a second webserver on B, that shows the current image via some CGI mechanism (PHP, bash, ...).
  • On A you just configure your webserver in aa way, that for the image URL it just proxies the request on to B

I consider this much cleaner, as it doesn't rely on some possibly brittle mechanism outside the scope of the webserver.

Eugen Rieck

Posted 2017-12-24T11:05:16.920

Reputation: 15 128

Now i understand how to use sshpass and now I can start a script from PC A to start a Script from PC B. – Greg – 2018-01-02T17:53:49.340