LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > sag47
User Name
Password

Notices


Rate this Entry

Ventrilo and RHEL/Fedora

Posted 01-03-2012 at 07:19 PM by sag47
Updated 01-03-2012 at 07:25 PM by sag47

Well I just set ventrilo up on my internal dev server. Just trying it out because I've heard other people talk about it and thought I would integrate it better with my system. I'm running Fedora 14 on my server but all of these scripts should work on Fedora 12/14 and RedHat EL 5/6. Untested on the new Fedora 16. Here's the service script.
Code:
#!/bin/bash
#Created by Sam Gleske
#For RHEL and Fedora-like operating systems

# chkconfig: - 0 0
# description: ventrilo is the ventrilo daemon. \
# It is a team speak-like service which runs on \
# port 3784.

### BEGIN INIT INFO
# Provides: ventrilo
# Short-Description: start and stop ventrilo
# Description: ventrilo is the ventrilo daemon. It is a team speak-like
#              service which runs on port 3784.


# source function library
. /etc/rc.d/init.d/functions

# Startup ventrilo servers.
#working directory of the service
SRVPATH=/home/ventrilo/ventsrv
#Service binary
SRVBIN=$SRVPATH/ventrilo_srv
#user which the subshell will run
SUBUSER=ventrilo
#service name for status messages
SRVNAME=Ventrilo

start(){
  if [ -f "$SRVPATH/ventrilo_srv.pid" ];then
    echo -n "$SRVNAME is already running."
    failure
    echo ""
  else
    su $SUBUSER -c "$SRVBIN -f$SRVBIN -d"
    #renice -5 `cat $SRVPATH/ventrilo_srv.pid`
    success
    echo "$SRVNAME has started."
  fi
}
stop(){
  if [ -f "$SRVPATH/ventrilo_srv.pid" ];then
    kill -s 15 `cat $SRVPATH/ventrilo_srv.pid` &> /dev/null
  else
    failure
    echo "$SRVNAME is not running."
    return 1
  fi
  if [ "$?" -eq "0" ];then
    echo -n "$SRVNAME is stopping."
    wait && success
    echo ""
  else
    failure
    echo "$SRVNAME is not running."
  fi
}
wait(){
  while true;do
    if [ ! -f "$SRVPATH/ventrilo_srv.pid" ];then
      return 0
    else
      sleep 1
      echo -n "."
    fi
  done
}
restart(){
  stop
  start
}

#control center
case "$1" in
start)
  start
  ;;
stop)
  stop
  ;;
restart)
  restart
  ;;
status)
  status ventrilo_srv
  ;;
*)
  echo "usage: $0 (start|stop|restart|status|help)"
esac
HOWTO: Ventrilo install on RedHat/Fedora

1) Create the user ventrilo
Code:
adduser ventrilo
2) Write my vent daemon script to /etc/init.d/ventrilo.

3) Download ventrilo_srv-3.0.3-Linux-i386.tar.gz from ventrilo.com to ~ventrilo and extract it.

4) Make sure ownership of all ventrilo files and folders are to user ventrilo.

5) Control the service using the following commands.
Code:
# service ventrilo help
usage: /etc/init.d/ventrilo (start|stop|restart|status|help)
6) Add the service to the machine startup process if you want ventrilo to start on boot.
Code:
chkconfig --add ventrilo
chkconfig --levels 35 ventrilo on
Don't forget to poke a hole in your firewall (I hope you're using a firewall) for port 3784 and that should be it!

SAM
Posted in Uncategorized
Views 2758 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 12:22 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration