cd /etc/init.d/ touch red5 chmod 755 red5 vi red5
Paste below code
#! /bin/sh
#
# Author: Jake Hilton <red5@jakehilton.com>
# /etc/init.d/red5
#
# Check for missing file
RED5_DIR=/opt/red5
test -x $RED5_DIR/red5.sh || exit 5
case "$1" in
start)
echo -n "Starting Red5 Service"
echo -n " "
cd $RED5_DIR
su -s /bin/bash -c "$RED5_DIR/red5.sh &" red5
sleep 2
;;
stop)
echo -n "Shutting down red5"
echo -n " "
cd $RED5_DIR
su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
sleep 2
;;
restart)
## Stop the service and regardless of whether it was
## running or not, start it again.
$0 stop
$0 start
;;
esac
then you maybe need
useradd red5
and use like
service red5 start
service red5 stop
service red5 restart
For Debian there's also a ready-made init script here: http://red5.googlecode.com/svn/build/debian/trunk/red5.init

