I have a server setup that will run locally on a raspberry pi. I have everything working except the terminal script. What I am trying to do is that after the form is submitted it launches the terminal and runs the command that will run until the pi is reset or window is closed.
<?php
$output = shell_exec('./start.sh');
echo $output;
?>
And the contents of start.sh
#!/bin/bash
cd /var/www/html/scoreboard/node/score/mscl-scrapper
lxterminal -e sudo xvfb-run -a node mvcc.js
I can run this in terminal and it works just fine. These are in the same directory whcih is within the server root. How can I execute this command?