My cousin wanted to have his own Ventrilo server so I set it up for him on a old PC running Ubuntu 9.04. He didn't want to have to start or stop the server just wanted to be able to leave the machine on all the time and if it did happen to be turned off wanted it to start automatically.
Here is the process:
Create a new user on your system to run the process as. I called the user ventrilo.
Create a new script in init.d
vi /etc/init.d/vent
Add the following:
#!/bin/sh
# ventrilo server
case "$1" in
'start')
# Startup ventrilo servers.
VENPATH=/home/ventsrv
VENBIN=$VENPATH/ventrilo_srv
su ventrilo -c "$VENBIN -f$VENPATH/ventrilo_srv -d"
renice -5 `cat $VENPATH/ventrilo_srv.pid` ;;
'stop')
killall ventrilo_srv
;;
*)
echo "Usage: $0 { start | stop }"
;;
esac
exit 0
Make sure you set the path correctly ie:
VENPATH=/home/ventsrv
Make the new script executable.
chmod +x /etc/init.d/vent
Run:
update-rc.d vent defaults
And reboot the server to confirm ventrilo starts on boot.
You can now stop and start your ventrilo server like so:
Start:
/etc/init.d/vent start
Stop:
/etc/init.d/vent stop
Thanks so much! Tried a couple other scripts with no luck, this one is solid! :D
ReplyDeleteyoutube adu ayam
ReplyDelete