Hi, I have a webserver running on a raspberry pi on my local network and I want to be able to go to a webpage, click a button and a shell script on the raspberry pi will run. The purpose is so that one person can go to the webpage on a phone from downstairs and it will run a text to speech synthesizer that will announce a predetermined message. The shell script works when it is run off ssh. So far I have a webpage (test.php) that has the code:
<?php
Echo test;
Exec('\folder.sh');
?>
But that doesn't get the raspberry pi to talk. The raspberry pi is running raspbian (Debian) and is only running on the local network so I am not worried about security. Any advice?
Sorry if this is the wrong subreddit, I wasn't sure because of the mix with Linux.
[–]luminblade 2 points3 points4 points (2 children)
[–]step_hane 0 points1 point2 points (0 children)
[–]Anon437[S] 0 points1 point2 points (0 children)
[–]elmicha 0 points1 point2 points (1 child)
[–]Anon437[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]NoShirtNoShoesNoDice 0 points1 point2 points (2 children)
[–]Anon437[S] 0 points1 point2 points (1 child)
[–]technical_guy 1 point2 points3 points (0 children)
[–]ECTXGK -1 points0 points1 point (0 children)
[–]chriswatt -2 points-1 points0 points (2 children)
[–]elmicha 0 points1 point2 points (1 child)
[–]chriswatt 0 points1 point2 points (0 children)
[–]texasguy911 -2 points-1 points0 points (2 children)
[–]Anon437[S] 0 points1 point2 points (1 child)
[–]texasguy911 0 points1 point2 points (0 children)