Adding a custom page to :2222

Aziz

Verified User
Joined
Oct 4, 2004
Messages
126
I have a bash script, which tells me something I need to know and access via outside domain (public).

I want to be able to do:

domain.com:2222/script

and it will give the output.

I tried to use a plugin, however, that requires user-login (which I don't want).

Any help appreciated.

Thanks,
 
What sort of information are you trying to get from the server.
 
Here is a php script to do that:

Code:
<?php

$apacheName = "httpd";  

print "The number of running httpd processes is: ";
$httpdProcs = system('ps xua | grep -v grep | grep -c "$apacheName"');

?>
 
It is easier to do:

"ps -C httpd | wc -l"

However, un-safe php functions like system/exec are disabled. That is why I want to use Bash and to be accessed via the CP.

Peace,
 
Your command is not universal between all unix systems and mine is. If you disabled php functions then you cant do it without logging into directadmin. Try writing something in perl or python.
 
Back
Top