3

Let's say I have a website and multiple pis. And I want to control my Pi from the website, for example I can reboot that X pi by just clicking on the button. Does anyone have a tool that do that ? Should I do that by using PHP, Python or what?

1 Answer 1

2

What you run on your website is irrelevant, so long as you have a safe login functionality and clients can receive messages.

Make the PIs login (python, perl libwww, even just curl if you're frisky) at intervals, and retrieve instructions to act on.

Limit these actions with a whitelist on the PI, since much will require root. You can use textfiles/fifos in e.g. /tmp if you wish to do webrequests as not-root, and read output as root.

2
  • Excellent idea. The website could leave instructions in a text file that could be picked up by scp periodically. I have been wondering how I was going to do just this without allowing inbound access at the office. The website is hosted elsewhere but they support all the usual Linux stuff. Thank you!
    – SDsolar
    Commented May 3, 2017 at 5:02
  • You're welcome. Do you opensource your solution?
    – user400344
    Commented May 22, 2017 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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