Skip to content

Instantly share code, notes, and snippets.

@gamefiend
Created June 28, 2012 19:27
Show Gist options
  • Save gamefiend/3013352 to your computer and use it in GitHub Desktop.
Save gamefiend/3013352 to your computer and use it in GitHub Desktop.
Ventrilo LSB init script
!/bin/sh
########################################################################
# Ventrilo start script
# LSB style init script -- assumes you have LSB package installed
# running on CentOS/RHEL 6
# Description : This is an LSB-style startup script for Ventrilo
#
# Authors : Quinn Murphy
#
# Version : 1.0
#
# Notes :
#
########################################################################
NAME='Ventrilo'
VENTRILO_PATH='/opt/bin/ventrilo/ventrilo_srv'
. /lib/lsb/init-functions
case "${1}" in
start)
log_success_msg "Starting $NAME..."
start_daemon $VENTRILO_PATH -d
if [ $? -gt 0 ]; then
log_failure_msg "Could not start $NAME"
else
log_success_msg "Started $NAME"
fi
;;
stop)
log_success_msg "Stopping $NAME..."
killproc $VENTRILO_PATH
if [ $? -gt 0 ]; then
log_failure_msg "Could not stop $NAME"
else
log_success_msg "Stopped $NAME"
fi
;;
restart)
${0} stop
sleep 1
${0} start
;;
*)
echo "Usage: ${0} {start|stop|restart}"
exit 1
;;
esac
exit 0
# End scriptname
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment