0
I have a bash code that, at the end of some installations, should automatically open a browser window with a URL (myapp.com) passed as parameter. A php configuration page is displayed, confirming that everything has been installed correctly and after 30 seconds this window should close automatically, install a few more things (among them Laravel) do all the configuration and open another window again, showing the Laravel home page.
bash stops in the browser opening process and does not end. Following this POST, What I have so far is the following code:
...
PRJ_URL = 'myapp.com'
...
firefox $PRJ_URL & PID=`jobs -p`& sleep 30s & kill $PID #OK-mostra a página do phpinfo() corretamente
... #instala mais algumas coisas
... #instala Laravel no folder desejado e configura as permissões
firefox $PRJ_URL #OK-mostra a página inicial do Laravel
Everything is working as expected. The last thing I can’t do is close the browser in the first process automatically as it should happen with the kill $PID
.
Where am I going wrong?