Form to create a text file and run shells script
I am new to web programming and kindly need your help.
I need to create a form with around five fields and multiple hidden variables.
You can use only one regular and one hidden variables for example. on a click of the submit button on the form, a text fille will be created and will upload that file on the remote server through scp (I have keys setup).
Now lets say form has one field server name. User enters server name (myservername) and clicks submits. I need the server name and the hidden variable on that text file like below.
once the input text file (myinput.txt) is created and coppied to the remote server dir on the click of the submit. I need another button on that form like runscript. On a click of a run script I need to run a shell script on the remote server which uses myinput.txt as input.
on remote server:
I need to display the output generated by the shell script on the web page
Thanks in advance for all the help.