laziness, impatience, and hubris | |
PerlMonks |
CGI page to ssh to another host and trigger a perl script and return back the responseby chidori (Novice) |
on Jun 29, 2014 at 02:27 UTC ( [id://1091596]=perlquestion: print w/replies, xml ) | Need Help?? |
chidori has asked for the wisdom of the Perl Monks concerning the following question:
Hi ,
I have a requirement to create a CGI page , where i have to execute a set of perl scripts in sequence. If A,B,C,D are the perl scripts to be executed in sequence. 'B' should be started only if 'A' script succeeds.I am planning to use Net::OpenSSH module for this. Couple of questions in my mind for which i don't have answer. When script is getting executed , I think it would be wise to let the user know of whats happening in the background. Would it be possible to capture the script output and send it back to cgi page . Be it success/failure , the script should send the log output to the cgi page for the user view. In addition , when it is success , script should trigger the next script in sequence as well. But I am not sure, how to capture the output and exit status and based on the result trigger the next script in sequence I feel a html table like one shown below, to display the execution progress would be good.
Apache server is setup in such a way , anyone who runs the script , it will executed as one common user. So there won't be a problem of permissions. Other than this , to my knowledge , I don't see any other issue that I have to address. But my instincts say there might be few other things that i am missing . Can someone please give me some heads up on this.
Back to
Seekers of Perl Wisdom
|
|