arkevius Posted September 14, 2012 Share Posted September 14, 2012 Hello all!I was wondering how I would go about creating a Mumble instance from information gathered on a web form? I would most likely use a php script in CGI-BIN to execute a python script on the server, no?What exactly would the python script consist of to create this instance?The whole idea is to be able to go to a web page and enter your information (such as the server name, the root channel name, how many slots, SuperUser password, etc), and when you submit the form it would execute a script that to the information from the form and created a new Mumble instance with it.I currently have Murmur installed with django, php, python, and ice all on an Ubuntu 12.04 server. Link to comment Share on other sites More sharing options...
arkevius Posted September 20, 2012 Author Share Posted September 20, 2012 Is this not possible? I figured since mumble hosting companies have them, it would be. Link to comment Share on other sites More sharing options...
sheepux Posted September 20, 2012 Share Posted September 20, 2012 From php it should be easy:1) Generate a murmur configuration file from the form input2) Start murmur with a -ini option pointing to the configurationUse php function POPEN (http://php.net/manual/function.proc-open.php) you can start it asynchronously with a START in the command line (and a /B to hide any eventual window) $handle = popen("start /B ". $cmd, "r"); if ($handle === FALSE) { die("Unable to execute $cmd"); } pclose($handle); This should work and can be improved (find a way get a pointer to the process ID to be able to stop the process anytime you want).Anyway, that was just a quick anwser :) Link to comment Share on other sites More sharing options...
arkevius Posted September 21, 2012 Author Share Posted September 21, 2012 This would create another mumble instance on a server? So if I were to do the form twice, it would create two separate instances of Mumble with a port increment of 1, and both would be running at the same time, like you can do in the mumble-django web panel. Link to comment Share on other sites More sharing options...
sheepux Posted September 21, 2012 Share Posted September 21, 2012 In fact, i'm not sure what's the correct method to get multiple murmur running on the same host. Look for that first. I only answered to your question "how to create a mumble instance from php". Cheers,Sheep Link to comment Share on other sites More sharing options...
Administrators kissaki Posted September 22, 2012 Administrators Share Posted September 22, 2012 With Ice you can administrate the murmur process from PHP or python - your choice.What you will do is through the API provided by Ice and Mumbles definitions, simply start a new virtual server and adjust the settings.For the murmur slice API of the stable version see http://mumble.sourceforge.net/slice/As for reference, you may want to check existing web interfaces like MumPI in PHP and Mumble Django in Python.I’m familiar with MumPIs code (it’s mine after all), so here some links to get you started:Server connection: https://github.com/Kissaki/MumPI/blob/master/classes/ServerInterface.php#L43Creating a server: https://github.com/Kissaki/MumPI/blob/master/classes/ServerInterface.php#L198Set config value: https://github.com/Kissaki/MumPI/blob/master/classes/ServerInterface.php#L272(You’ll notice a bit of abstraction in the ServerInterface class here, but should be able to easily follow it. :) Four class member variables.)As you probably have noticed by my answer by now, you were right in suggesting starting up new processes for each server is not the preferred or most efficient way. A single process is able to host several virtual servers with separate configurations. Link to comment Share on other sites More sharing options...
arkevius Posted September 26, 2012 Author Share Posted September 26, 2012 Thank you all for the advice! I haven't been able to mess around with it as much as I want, but as soon as I get some time I'll start cranking out some code. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now