I'm working on a web-based interface for bash scripts used to rip DVDs and CDs. The goal is to package it as an app for the
Amahi project. The bash scripts and web server are running on the same box.
I've run into a tough technical hurdle - I need bash to push a popup dialog box to open in the web page interface with <OK> <CANCEL> buttons that get returned to the script.
My web coding kung-fu is not up to the challenge. Mootools looks promising but I don't know how to implement it.
However, I am thinking about a method whereby the bash script creates or modifies a variable in a file and then goes into a loop where it checks for the variable to be modified again before continuing. PHP or javascript in the web page is also in a loop that checks the file once every few seconds and upon finding the necessary variable opens the dialog box. After the user makes his selection the variable is again changed by the web page script, the bash script loop finds the change and continues.
I've tried writing a loop checker in php but it just locks the page. Any suggestions?