Imaulle Posted July 28, 2010 Share Posted July 28, 2010 Hello! I want to build a script to basically keep track of the number of hosting accounts that are currently on each server. I have roughly 30 servers (root access, WHM, cPanel) that I would like to be able to track all of from a single page. Could someone help/point me in the right direction/offer any input? thanks! much appreciated! Link to comment https://forums.phpfreaks.com/topic/209070-script-to-keep-track-of-accounts/ Share on other sites More sharing options...
trq Posted July 28, 2010 Share Posted July 28, 2010 Could someone help/point me in the right direction/offer any input? Where exactly are you stuck? Link to comment https://forums.phpfreaks.com/topic/209070-script-to-keep-track-of-accounts/#findComment-1091946 Share on other sites More sharing options...
Imaulle Posted July 28, 2010 Author Share Posted July 28, 2010 haha I haven't even started yet... what I'm trying to find out is if its possible to I guess run some type of http command to each server CHM to return the number of accounts, or if I need to have a script on each server, and then have the main script access that script? Link to comment https://forums.phpfreaks.com/topic/209070-script-to-keep-track-of-accounts/#findComment-1091950 Share on other sites More sharing options...
trq Posted July 28, 2010 Share Posted July 28, 2010 I don't use any of the control panels but it would be easy enough to do using simple shell scripts. Just ssh into each box, and list (or count) all the vhost files. Link to comment https://forums.phpfreaks.com/topic/209070-script-to-keep-track-of-accounts/#findComment-1091954 Share on other sites More sharing options...
Imaulle Posted July 28, 2010 Author Share Posted July 28, 2010 hmmm okay I've gotten a php script to connect via ssh to all the servers... now what is the command to count all the vhost files? Link to comment https://forums.phpfreaks.com/topic/209070-script-to-keep-track-of-accounts/#findComment-1092005 Share on other sites More sharing options...
trq Posted July 28, 2010 Share Posted July 28, 2010 Assuming there all in /etc/apache/vhosts (which they may not be). let x=$(ls -l /etc/apache/vhosts | wc -l)-1 ; echo $x This can be executed through php via exec. Link to comment https://forums.phpfreaks.com/topic/209070-script-to-keep-track-of-accounts/#findComment-1092025 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.