Jump to content

Javascript execute Shell Script Function


cherault

Recommended Posts

Dear all,

I managed a web interface under Linux/Apache.
This interface must start and stop some shell scripts, through HTML buttons.

My goal is to use just only one HTML button to do 3 actions:

1- Stop a shell script
2- Open a new HTML page
3- Start a new shell script

So, usually, I will drive it like this:

<script language="javascript">
function button() 
{
	function1();
  	function2();
  	function3();
}
</script>

But my problem is what kind of Javascript function is able to start and stop a shell script ?
I found various answer with PHP, but I don't want use it ! Just HTML/JAVASCRIPT.

Can you please help me ?

Thank you for your support and help.

Best regards,

Link to comment
Share on other sites

Thanks Ingolme,

So I can't call a shell script from Javascript. But from PHP it is possible, so why not whith Javascript ?
I don't understand why, but it's ok, I will find a solution. I don't want to use PHP. May be there is another solution.

Regards,

Link to comment
Share on other sites

4 hours ago, cherault said:

Ok, thanks Smus.

Is it possible to do that with node.js ?
If yes how ?

Regards,

I am not really into Linux shell system, but if you don't want to use PHP, other server side languages might be the alternative

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...