[Red5] Red5 daemon startup on Fedora/RedHat/CentOS?

Prabhu Tamilarasan (omNovia) ptamilarasan at omnovia.com
Tue Sep 29 12:38:35 PDT 2009


In the stop case, you could always just run the red5-shutdown.sh script instead of killall.


Prabhu Tamilarasan
Director of Technology
ptamilarasan at omnovia.com

next generation web conferencing

Follow us: 

675 Bering Drive, Suite 290
Houston, TX 77057 USA
www.omNovia.com
T +1.281.500.4065 





-----Original Message-----
From: red5-bounces at osflash.org [mailto:red5-bounces at osflash.org] On Behalf Of Richard Alam
Sent: Tuesday, September 29, 2009 1:57 PM
To: red5 at osflash.org
Subject: Re: [Red5] Red5 daemon startup on Fedora/RedHat/CentOS?

Someone (another Jeremy) put up this on BBB's downloads area.

http://code.google.com/p/bigbluebutton/downloads/list

Please see if this works.

----

#!/bin/bash
#
# red5  Starts Red5.
# chkconfig: 345 88 12
# description: Red5 flash streaming server
#
# processname: java (unfortunately)
# pidfile: /var/run/red5.pid
# config: /etc/red5.conf

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

RED5_HOME=/opt/red5-0.8/
RUNTIME_USER=red5
JAVACMD=/usr/bin/java
DESCR="Red5 flash streaming server"
PID_FILE=/var/run/red5.pid
PID=`ps ax |grep java|grep red5|sed "s/\([0-9]\) .*/\1/"`
RETVAL=0

# JAVA options
# You can set JAVA_OPTS to add additional options if you want
# Set up logging options
LOGGING_OPTS="-Dlogback.ContextSelector=org.red5.logging.LoggingContextSelector
-Dcatalina.useNaming=true"
# Set up security options
SECURITY_OPTS="-Djava.security.debug=failure"
export JAVA_OPTS="$LOGGING_OPTS $SECURITY_OPTS $JAVA_OPTS"

if [ -z "$RED5_MAINCLASS" ]; then
  export RED5_MAINCLASS=org.red5.server.Bootstrap
fi

# Jython options
JYTHON="-Dpython.home=lib"

export RED5_CLASSPATH="${RED5_HOME}/boot.jar:${RED5_HOME}/conf:${CLASSPATH}"

# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0

# Read config file if it is present.
if [ -r /etc/red5.conf ]
then
. /etc/red5.conf
fi


start() {
echo -n $"Starting $DESCR: "
# daemon $JAVACMD $OPTIONS > /dev/null 2>&1 &
su -p -s /bin/sh $RUNTIME_USER -c "\"$JAVACMD\" \"$JYTHON\"
-Dred5.root=\"${RED5_HOME}\" $JAVA_OPTS -cp \"${RED5_CLASSPATH}\"
\"$RED5_MAINCLASS\" $RED5_OPTS" > /dev/null 2>&1 &
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/red5 && echo $!>$PID_FILE &&
echo_success
echo
return $RETVAL
}
stop() {
echo -n $"Stopping $DESCR: "
#killproc $PID_FILE
[[ $PID != "" ]] && success && kill $PID || failure
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/red5 $PID_FILE
}


# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 3
start
;;
*)
echo $"Usage: $DESCR {start|stop|restart"
exit 1
esac

exit $RETVAL


On Tue, Sep 29, 2009 at 2:47 PM, Richard Alam <ritzalam at gmail.com> wrote:
> Would this help?
>
> http://blogfranz.blogspot.com/2009/01/start-stop-daemon-on-centosrhel5-and.html
>
> Richard
>
> On Tue, Sep 29, 2009 at 2:31 PM, Jeremy Morton <admin at game-point.net> wrote:
>> Fred Dixon wrote:
>>>
>>> Hi Jeremy,
>>>
>>> Here's the init.d script we use for Ubuntu/Debian to start red5 for
>>> BigBlueButton -- I've not had the chance yet to convert it for RedHat.
>>> Rather than wait, if someone is on RedHat and wants to covert it, please
>>> feel free to use this script as a starting point and post the changes
>>> they made to get it working. It's based on the init script for tomcat6.
>>
>> A massive script... and it *still* manages to use start-stop-daemon, which
>> isn't available on RedHat OSes.  :-)
>>
>> Best regards,
>> Jeremy Morton (Jez)
>>
>> _______________________________________________
>> Red5 mailing list
>> Red5 at osflash.org
>> http://osflash.org/mailman/listinfo/red5_osflash.org
>>
>
>
>
> --
> ---
> BigBlueButton
> http://www.bigbluebutton.org
> http://code.google.com/p/bigbluebutton
>



-- 
---
BigBlueButton
http://www.bigbluebutton.org
http://code.google.com/p/bigbluebutton

_______________________________________________
Red5 mailing list
Red5 at osflash.org
http://osflash.org/mailman/listinfo/red5_osflash.org




More information about the Red5 mailing list