1

I have an EC2 instance running Red5 and I added the following script to the scripts that run on startup and shutdown of the server:

################# NOTE FROM DOMINICK
# First Follow these directions
#http://embraceubuntu.com/2005/09/07/adding-a-startup-script-to-be-run-at-bootup/
#################

# 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 &amp;" infrared5 
        sleep 2
        ;;
    stop)
        echo -n "Shutting down red5"
        echo -n " "
        ##su -s /bin/bash -c "killall -q -u infrared5 java" infrared5
        su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &amp;" infrared5
        sleep 2
        ;;
    restart)
        ## Stop the service and regardless of whether it was
        ## running or not, start it again.
        $0 stop
        $0 start
        ;;
esac

The only change I made was the location of red5 which is in /usr/share/red5 on my instance.

After Following the instructions on the following site: Adding a startup script to be run at bootup on how to install the script I ran the following command from the terminal /etc/init.d/red5 start and got the following:

enter image description here

I navigate to http://somedomain.com:5080/ which is the red5 start page and I get a 404.

Rebooting the server also seems to have the same effect. Not sure how to touble shoot this one and could use some help figuring out what I may be doing wrong.

Jorge Castro
  • 73,717
mattwallace
  • 111
  • 6

1 Answers1

1

The script needs an user infrared5 that doesn't exist on your system. Create that user and check the documentation whether it needs special privileges or permissions to some files or directories.