Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, I am trying to set a ventrilo server to automatically start on bootup of my Debian box. I am not grately familiar with the process to do thism but ...
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    12

    Ventrilo Start-up Script

    Hello,

    I am trying to set a ventrilo server to automatically start on bootup of my Debian box. I am not grately familiar with the process to do thism but I have worked out that I need to put the script in the /etc/init.d dir and make a sym link to it from the rc2.d dir and make the script executable. I found this script that someone was using and hoped that I may be able to use it:

    Code:
    #!/bin/sh
    # ventrilo server
    
    case "$1" in
    'start')
    	# Startup ventrilo servers.
    	
    	VENPATH=/home/ventrilo
    	VENBIN=$VENPATH/ventrilo_srv
    	
    	su ventrilo -c "$VENBIN -f$VENPATH/3784 -d"
    	
    	renice -5 `cat $VENPATH/3784.pid`
    	;;
    'stop')
    	killall ventrilo_srv
    	;;
    *)
    	echo "Usage: $0 { start | stop }"
    	;;
    esac
    exit 0
    I gather that there should be a user named "ventrilo" and that the relevant files need to be in the /home/ventrilo dir, which they are. I have created a user named "ventrilo" but do not know if there is any specific permissions I need to grant..?

    I also notice that the boot messages say something about ventrilo right at the end (so I guess at least that means the script is being run on boot-up) but it goes by too quick for me to read it... Can anyone tell me where I can review the boot messages after the system has started?

    Any help is much appreciated as always.

  2. #2
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    can you start ventrillo serve manually?

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Posts
    12
    I can indeed. And I can then successfully connect to the ventrilo server from one of the other PCs on my local network.

    Of course it's not such a huge hassle to just manually start the ventrilo server when I want to use it, but I just thought if I can set it up to automatically start on boot-up, that would be cool and I could learn (or rather remember :P, it's been a long time since I've had a running Linux box and this is my first experience with Debian) a little more about Linux in the process.

  4. #4
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    the script in the first post are working for you?
    if yes copy the script to the /etc/init.d directory and make symlinks from the
    /etc/rcX.d directories to the script

  5. #5
    Just Joined!
    Join Date
    Dec 2006
    Posts
    12
    Nah, sorry dude, I think I must have not been clear enough. The script is not working for me in so far as it does not appear to start the ventrilo process on boot. I have already ascertained that I need to put the script in the /etc/init.d directory, make it executable and create a sym link from it to the rc2.d directory.

    So basically, in my quest to try and get the script working, there are two areas that I am trying to get more information:

    1. I see something about ventrilo fly by as the system boots, which would make me think that the ventrilo script in /etc/init.d is being run, but as the daemon is not appearing, I assume the script is not doing what it should. Hence, my question about where I may be able to review boot messages after the system comes up...?

    2. I have read that some people are creating a 'ventrilo' user and running the ventrilo process with this user. It would appear that the script in my initial post is expecting this user(?) so I made a ventrilo user but am not sure about any permission changes that may need to be made... Does the script have to run as root or this ventrilo user for example? Or does this not make a difference? Permissions under Linux are still a bit of a mystery to me unfortunately. Can anyone give me some more information as to how one handles these users set up specifically for the purpose of running a process under that account?

  6. #6
    Linux User
    Join Date
    Feb 2006
    Posts
    484
    1, dmesg command

    2, i think only root can start daemon process

    write your own script

    a very minimal script
    ##########
    #!/bin/sh

    ventrilo -[the option which start ventrilo as daemon]

    exit 0

    put in the /etc/init.d and create symlink from rc2.d to this script

  7. #7
    Just Joined!
    Join Date
    Dec 2006
    Posts
    12
    OK thanks for your help, iwanabeguru. I think I'm getting more of a grip on this, I'll let you know how I go when I have time to play with debian some more.

  8. #8
    Just Joined!
    Join Date
    Dec 2006
    Posts
    12
    Finally had some time to get back to my ventrilo issue and I've got it working! So I thought I might share my experience here to possibly enable some one else to get the same issue resolved more quickly.

    The start up script I ended up using is this:

    Code:
    #!/bin/sh
    # ventrilo server
    
    case "$1" in
    'start')
            # Startup ventrilo servers.
    
            VENPATH=/home/ventrilo
            VENBIN=$VENPATH/ventrilo_srv
    
            su ventrilo -c "$VENBIN -f$VENPATH/ventrilo_srv -d"
    
            renice -5 `cat $VENPATH/3784.pid`
            ;;
    'stop')
            killall ventrilo_srv
            ;;
    *)
            echo "Usage: $0 { start | stop }"
            ;;
    esac
    exit 0
    I just needed to get the paths right, make the script executable, and use the update-rc.d command to set up the sym links and stuff. the above script expects a "ventrilo" user to exist and all the required files then end up going in the /home/ventrilo directory and you point to this directory in the script after the -f as seen above. The ventrilo binary is ventrilo_srv also as seen above.

    And bam! You've got a ventrilo daemon running under the ventrilo user account. also see the ventrilo_srv.htm file that comes with the installation files for more info.

    If you wanted to run multiple ventrilo servers on different ports, then you can use something like the script in my original post (which was the one I used and just changed a bit), which expects there to be a sub directory called "3784" (which is the default port number) and have all the files in there, you can then have a separate sub directory for each ventrilo server. But I only wanted to run one ventrilo server anyway.

    I think my problem was that I assumed it would be more complicated than it actually was.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •