This is a read-only archive of the Mumble forums.

This website archives and makes accessible historical state. It receives no updates or corrections. It is provided only to keep the information accessible as-is, under their old address.

For up-to-date information please refer to the Mumble website and its linked documentation and other resources. For support please refer to one of our other community/support channels.

Jump to content

[LINUX] murmur Startscript


lux73
 Share

Recommended Posts

Hi all!


i have wrote a small & basic start-stop script for murmur server under Linux - tested on Debian lenny 5.0 64bit - it should work on all other Linux systems


place it under /etc/init.d/murmurd - make sure you have executable rights


chmod 755 /etc/init.d/murmurd


it has 4 basic commands:


/etc/init.d/murmurd start- to start the server


/etc/init.d/murmurd stop - to stop it


/etc/init.d/murmurd restart - for restart


/etc/init.d/murmurd status - status information


you need only to edit the configuration part:

 

################ CONFIGURATION START ##############################

# description
DESC="murmur-Server"

# running murmurd as specific user
USER=murmurd

# path to the working directory
DIR=/srv/murmur1.2.2

# name of the config file
INI=murmur.ini

# binary name
BIN=murmur.x86

################ CONFIGURATION END ################################

 

it should be self explained... ;)


here's the whole script:

 

#! /bin/sh
#
# Basic Murmur Startscript by lux73
#
# v1.0 13.02.2010
#
#

################ CONFIGURATION START ##############################

# description
DESC="murmur-Server"

# running murmurd as specific user
USER=murmurd

# path to the working directory
DIR=/srv/murmur1.2.2

# name of the config file
INI=murmur.ini

# binary name
BIN=murmur.x86

################ CONFIGURATION END ################################

PARAMS="-ini $DIR/$INI"

case "$1" in
start)
         echo "trying to start $DESC..."
         if [ $(pidof $BIN) ] 
  then
          echo "$DESC is ALREADY running! ABORT!"
          exit 1
  else
                 su $USER -c "cd $DIR; ./$BIN $PARAMS"
                 sleep 1
                 echo "===> $DESC started succesfully!!"
                 exit 0
         fi
         ;;

stop)
         echo "trying to stop $DESC..."
         if [ ! $(pidof $BIN) ]
         then
                 echo "$DESC is even NOT running! ABORT!"
                 exit 1
         else
                 kill $(pidof $BIN)
                 sleep 1
                 echo "===> $DESC stopped succesfully!!"
                 exit 0
         fi
         ;;

restart)
  $0 stop
  sleep 1
  $0 start
  exit 0
  ;;

status)
         echo "Running Process from $DESC:"
         if [ ! $(pidof $BIN) ]
         then
                  echo "===> no active process found! <==="
                  exit 0
         else
                  ps -lC $BIN --no-heading
         fi
         ;;

*)
         echo "Usage: /etc/init.d/murmurd start|stop|restart|status"
         exit 1
         ;;
esac

 

have fun with it! :mrgreen:


greetings from Germany


Lux

Link to comment
Share on other sites

  • 4 weeks later...

One can also use the init.d script provided in the source tar archive of mumble. In the subdirectory 'scripts' you can find the file murmur.init which can be copied to the /etc/init.d (or corresponding directory depending on your distribution). You also may need to at a file called 'mumble-server' in /etc/defaults containing the lines:

MURMUR_DAEMON_START=1
MURMUR_USE_CAPABILITIES=0

This script also expects the file 'mumble-server.ini' in /etc, an example of this file can also be found in the scripts subdirectory of the mumble source tar archive.


Hopefully it helps.

Computer specs: AMD FX-8320, 8GB DDR3-SDRAM, AMD Radeon HD 7950, Asus Xonar D1, Windows 7 Ultimate 64bit/Debian Jessie AMD64.

Link to comment
Share on other sites

I'm getting the following when attemping to use this on Centos 5.4

 

/etc/init.d/murmurd: line 68: pidof: command not found

 

How can I fix this?

Hi!


try to replace

 

if [ $(pidof $BIN) ]

 

with

 

if [ $(/sbin/pidof $BIN) ]

 

in my Script - must replace 3 times


seems to be CentOS specific - google say: "pidof" command is located in "/sbin" and default PATH for centos doesn't include "/sbin" as its path


good luck! ;)

Link to comment
Share on other sites

 Share

×
×
  • Create New...