Difference between revisions of "Running Murmur"

From Mumble Wiki
Jump to: navigation, search
(h2 => h1)
(Running From Command Prompt)
Line 8: Line 8:
 
== Running From Command Prompt ==
 
== Running From Command Prompt ==
  
To set the SuperUser password run
+
To set the SuperUser password run (note that if you are on Unbuntu/GNU Linux you must do sudo
  
'''./murmur -supw <password>'''
+
'''sudo murmurd -supw <password>'''
  
 
This will set the password in the DB and exit.
 
This will set the password in the DB and exit.
Line 16: Line 16:
 
To run the server
 
To run the server
  
'''./murmur'''
+
'''sudo murmurd -ini <PATH_TO_INI>[in Ubuntu this is /etc/mumble-server.ini]'''
  
 
If you want to have access to the console at a later date, you can first start a screen
 
If you want to have access to the console at a later date, you can first start a screen
  
'''screen -AmS murmur'''
+
'''screen -AmS murmurd -ini <PATH_TO_INI>[in Ubuntu this is /etc/mumble-server.ini]'''
  
 
Then start murmur, and then do a Ctrl-A D.  This will disconnect the screen.  To get back into the screen at a later date.
 
Then start murmur, and then do a Ctrl-A D.  This will disconnect the screen.  To get back into the screen at a later date.

Revision as of 18:42, 21 August 2008

Murmur: Mumble Server

Running From The Start Menu

This will run the basic application if you go to the program files menu and select Mumble then click on "murmur". This will start murmur with no extra options. Configuring The Run From Start Menu Well once you get to the murmur thing in the program files menu instead of left clicking, right click and left click on properties. In here you will see multiple text boxes, the target text box is the one that interests us. We may want an admin cp password so take -supw passwordhere on the end in the quotes and now we have an admin password, then if you want to use another ini file, take a space then -ini filenamehere after that to load that ini file onto the end. Read Configuring Murmur for information on using the ini file. If you checked out from svn, you can find an example ini file in the scripts directory.

Running From Command Prompt

To set the SuperUser password run (note that if you are on Unbuntu/GNU Linux you must do sudo

sudo murmurd -supw <password>

This will set the password in the DB and exit.

To run the server

sudo murmurd -ini <PATH_TO_INI>[in Ubuntu this is /etc/mumble-server.ini]

If you want to have access to the console at a later date, you can first start a screen

screen -AmS murmurd -ini <PATH_TO_INI>[in Ubuntu this is /etc/mumble-server.ini]

Then start murmur, and then do a Ctrl-A D. This will disconnect the screen. To get back into the screen at a later date.

screen -r

Adding Registered Users

The default way to setup registered users is to use the murmur.pl perl script. You need to setup a webserver and make sure its is configured to execute it as CGI.

If you just want to add,remove,edit users there is a linux bash script for easy adding below: Copy the following content in a file named config.sh, place it in your murmur direcotry, make it executable and see ./config.sh --help for further instructions.

Note: Although this works, it is highly discouraged to update users directly via the database. Changes made directly to it will not be reflected in murmur unless it's restarted. Use DBUS instead (the perl scripts use DBUS).

#!/bin/bash
#
# -> config.sh 
#
#   version: 1.1
#   author: Massimo Mund
#   date: 21.12.2007
#   description: a script to easily add, remove and edit users from a murmur server
#

#information
version="1.1"

#settings
bin="sqlite3"
dbfile="./murmur.sqlite"

function checkforsqlite() {

	if [ ! -f /usr/bin/sqlite3 ]; then
		echo "it seems that there is no sqlite3 installed, which is necessary for this script! "
		echo "install sqlite3 and try it again!"
		exit
	fi

}

function help () {

	echo ""
	echo " usage: config.sh <cmd> | --help | --version"
	echo ""
	echo " commands:"
	echo "   showusers"
	echo "   adduser <username> <pw> [<serverid>] [<email>]"
	echo "   deluser <username> [<serverid>]"
	echo "   setpw <username> <newpw> [<serverid>]"
	echo "   setemail <username> <newemail> [<serverid>]"
	echo ""
	exit

}

function version() {

	echo "config.sh : version: $1"
	exit
}

function invalidoption () {

	echo "config.sh : invalid option -- $*"
	echo "Try 'config.sh --help' for more information."
	exit

}

checkforsqlite

while [ "$#" -gt "0" ]; do
        case $1 in
		showusers)
			$bin $dbfile "select * from players;"
			exit
		;;
                adduser)
			shift
                        username="$1"
                        email="$4"
			pw="$2"
			serverid="$3"
			playerid=$($bin $dbfile "select MAX(player_id)+1 as id from players WHERE player_id < 10000;")

			if [ "$serverid" == "" ]; then
				serverid="1"
			fi

			$bin $dbfile "insert into players (server_id, player_id, name, email, pw) values($serverid, $playerid, '$username', '$email', '$pw');"
			exit
                ;;
		deluser)
			shift
			username="$1"
			serverid="$2"

                        if [ "$serverid" == "" ]; then
                                serverid="1"
                        fi

			$bin $dbfile "delete from players where name='$username';"
			exit
		;;
		setpw)
			shift
			username="$1"
			newpw="$2"
			serverid="$3"

                        if [ "$serverid" == "" ]; then
                                serverid="1"
                        fi
		
			$bin $dbfile "update players set pw='$newpw' where name='$username';"
			exit
		;;
		setemail)
                        shift
                        username="$1"
                        newemail="$2"
                        serverid="$3"

                        if [ "$serverid" == "" ]; then
                                serverid="1"
                        fi

                        $bin $dbfile "update players set email='$newemail' where name='$username';"
			exit
		;;
		--help)
			help
		;;
		--version)
			version $version
		;;
                *)
			invalidoption $*
                    	break
                ;;
        esac
done

invalidoption $*