0

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?

3
  • That doesn't run "in the terminal" though, does it? It requires a running DISPLAY= server. Commented Apr 18, 2021 at 6:32
  • @mario No I dont need a display to run this. It runs headless. Commented Apr 18, 2021 at 21:18
  • xfvb probably, but lxterminal certainly doesn't. Commented Apr 18, 2021 at 21:46

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.