SOLVED: Ventrilo Server for Linux @ Startup

Questions about applications and software
Forum rules
Before you post please read this

SOLVED: Ventrilo Server for Linux @ Startup

Postby Drake2k on Tue Nov 11, 2008 7:05 pm

I've installed Ventrilo server for linux on my Elyssa box. I can run it, I can connect to it from outside my network and from within. The only thing I can't seem to do is to get it to start automatically. There are instructions in the manual that I've listed before but either I didn't do something right, or they don't work for LinuxMint.

I've created a user named ventrilo and a group called ventrilo. Not sure why but it seemed like that's what I was supposed to do. I put the server files in /home/ventrilo.

I've tried to edit the /etc/rc.local file but not sure if I did it right.

Here's what the manual said to do.
Code: Select all
Example startup scripts:

The following script is an example of starting Linux based server(s) from the "/etc/rc.d/rc.local" file when a system is booted. Notice that they are started with the specific user account called "ventrilo" and the process priority is bumped to higher then normal.

    # Startup ventrilo servers.

    VENPATH=/home/ventrilo
    VENBIN=$VENPATH/ventrilo_srv

    su ventrilo -c "$VENBIN -f$VENPATH/ventrilo_srv -d"

    renice -5 `cat $VENPATH/ventrilo_srv.pid`

Note: Those are GRAVE characters around the `cat ... pid` strings. Also known as backwards apostrophe.

The "renice" command is used to bump the priority of the daemon process thus preventing it from being starved for CPU time if the same machine is used for running other programs like FTP or WEB servers. The Windows version of the server does this automatically. However, in a *NIX environment only the "root" user is allowed to bump process priority.



Any suggestions?
I want to be able to turn my computer on and leave. When it's sitting on the log in screen I want it to be running vent server, as it is already running Apache2 PHP MySql etc.

--edit--
I got it working as you can tell by the post below. I hope this helps someone. Also I got TeamSpeak to run the same way on the same machine by following the steps in this Tutorial.
http://ubuntuforums.org/showthread.php?t=236834
Last edited by Drake2k on Wed Nov 12, 2008 10:48 am, edited 1 time in total.
Drake2k
Level 2
Level 2
 
Posts: 53
Joined: Mon Feb 04, 2008 1:22 am

Linux Mint is funded by ads and donations.
 

Re: Ventrilo Server for Linux @ Startup

Postby Drake2k on Tue Nov 11, 2008 8:34 pm

Woot! I figured it out. I put the Info from the manual in /etc/init.d/rc.local inserted in line two.

Works perfect.

Code: Select all
#! /bin/sh
VENPATH=/home/ventrilo
VENBIN=$VENPATH/ventrilo_srv

su ventrilo -c "$VENBIN -f$VENPATH/ventrilo_srv -d"

renice -5 `cat $VENPATH/ventrilo_srv.pid`

PATH=/sbin:/bin:/usr/sbin:/usr/bin
[ -f /etc/default/rcS ] && . /etc/default/rcS
. /lib/lsb/init-functions

do_start() {
   if [ -x /etc/rc.local ]; then
      log_begin_msg "Running local boot scripts (/etc/rc.local)"
      /etc/rc.local
      log_end_msg $?
   fi
}

case "$1" in
    start)
   do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
esac
Drake2k
Level 2
Level 2
 
Posts: 53
Joined: Mon Feb 04, 2008 1:22 am


Return to Software & Applications

Who is online

Users browsing this forum: No registered users and 24 guests