2008
06.15

Hello everyone,

some minutes ago i had to create a Linux start script for Ventrilo a great voice communication software especially for gamers.

The script
This script is absolutely simple and configurable

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
#!/bin/sh
 
####################
# Configuration 
 
var_User="ventrilo"
var_Path="/home/gaming/ventrilo/"
var_Daemon="ventrilo_srv"
 
####################
# Don not edit below this line
 
case "$1" in start)
echo "Starting Ventrilo Server."
cd $var_Path
./$var_Daemon -d
echo "Ventrilo Server Started"
;;
stop)
echo "Shutting Down Ventrilo Server."
cd $var_Path
kill `cat $var_Daemon.pid`
echo "Ventrilo Server Is Now Down"
;;
restart)
echo "Restarting Ventrilo Server..."
cd $var_Path
kill `cat $var_Daemon.pid`
./$var_Daemon -d
echo "Ventrilo Server Restarted"
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0

So long,
Andreas Glaser

4 comments so far

Add Your Comment
  1. -jailshell: ./startv: /bin/sh^M: bad interpreter: No such file or directory

    how can i fix it?

  2. u guys are the best!

  3. Shouldn’t the startup set the PID to $var_Daemon?

    I had to change

    kill `cat $var_Daemon.pid`

    to

    killall $var_Daemon

    for stopping and restarting the server to make the script work. Nice and simple script though, I like it!

    Maybe starting the server with predetermined PID would solve the problem :>

  4. You fucking rock thank you so much for de script!