Can't stop service.

Webmin
Drexl
2013-11-05
2013-11-05
  • Drexl
    Drexl
    2013-11-05

    I have created an upstart service for a mumble server. It looks like this:

    # murmur
    #
    # Mumble Server
    
    description  "Mumble Server"
    
    start on runlevel [2345]
    stop on runlevel [!2345]
    
    exec /usr/murmur/murmur.x86 -ini /usr/murmur/murmur.ini
    

    It does not start at boot even though it is set to. I can start it manually, but I can't stop it.
    What do I need to do? I'm not familiar with upstart services or init scripts either. I know where murmur writes it's PID file if that helps. Also, is there a way to make this run as a specific user with webmin?

    Thanks! ^_^

     
  • Drexl
    Drexl
    2013-11-05

    Solved. The required init script is below. Source: http://computerpr0n.com/2013/06/installing-murmurd-1-2-4/#comment-4248

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    #! /bin/sh
    #
    # mumble server initscript for mandriva
    #
    ### BEGIN INIT INFO
    # Provides:             mumble-server
    # Required-Start:       $network $local_fs $remote_fs messagebus
    # Required-Stop:        $network $local_fs $remote_fs messagebus
    # Should-Start:         $mysql
    # Should-Stop:          $mysql
    # Default-Start:        2 3 4 5
    # Default-Stop:         0 1 6
    # Short-Description:    Mumble VoIP Server
    # Description:          Mumble VoIP Server
    ### END INIT INFO
    
    # Source function library.
    . /etc/rc.d/init.d/functions
    
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    NAME=mumble-server
    LOCK_FILE=/var/lock/subsys/$NAME
    PID_FILE=/var/run/$NAME/$NAME.pid
    DAEMON=/usr/local/sbin/murmurd
    USER=mumble-server
    
    test -x $DAEMON || exit 0
    
    INIFILE=/opt/mumble-server/mumble-server-default.ini
    DAEMON_OPTS="-ini $INIFILE"
    
    start() {
            printf "Starting $NAME: "
            daemon --user $USER $DAEMON $DAEMON_OPTS
            RETVAL=$?
            echo
            [ $RETVAL -eq 0 ] && touch $LOCK_FILE
    }
    
    stop()  {
            printf "Shutting down $NAME: "
            killproc $DAEMON
            RETVAL=$?
            echo
            if [ $RETVAL -eq 0 ]; then
                    rm -f $LOCK_FILE
                    rm -f $PID_FILE
            fi
    }
    
    reload() {
            printf "Reloading $NAME configuration: "
            killproc $DAEMON -HUP
            RETVAL=$?
            echo
    }
    
    case "$1" in
        start)
            start
            ;;
        stop)
            stop
            ;;
        status)
            status $DAEMON
            RETVAL=$?
            ;;
        reload)
            reload
            ;;
        restart)
            stop
            start
            ;;
        condrestart)
            if [ -f $LOCK_FILE ]; then
                stop
                start
            fi
            ;;
        *)
            printf "Usage: %s {start|stop|restart|reload|condrestart|status}\n" "$0"
    esac
    
    exit $RETVAL
    
     
  • Drexl
    Drexl
    2013-11-05

    Disregard, my symlinks were in the wrong order for booting mysql and the mumble server. I reordered them and all is well.

    I take it back. It's not solved. When I click the radio button to start this at boot time it still doesn't actually start. Now I can just solve this with chkconfig manually, but this should work no? Is this a bug?

    Webmin version 1.660
    CentOS 6.4

     
    Last edit: Drexl 2013-11-06