4

I have followed this pretty little tutorial to install red5 on Ubuntu 11.04
I can now run it from /usr/share/red5/red5.sh
But I'd like to have a init.d script like /etc/init.d/red5 start|stop|restart|...
I found one here but when used, it's saying

.: 11: Can't open /etc/rc.d/init.d/functions

What can I do to make it work ?

Edit

Replacing . /etc/rc.d/init.d/functions by . /lib/lsb/init-functions will give me

$ sudo /etc/init.d/red5 stop
/etc/init.d/red5: 50: status}”: not found
stop : missing task name
Try 'stop --help' for more information.
restart : missing task name
Try 'restart --help' for more information.

Pierre de LESPINAY
  • 831
  • 2
  • 13
  • 36

1 Answers1

5

The init script you've found depends on non-existing file. Try replacing:

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

with this:

# Source function library
. /lib/lsb/init-functions

It's possible that there will be more changes needed.

jnv
  • 3,304
  • 2
  • 19
  • 28
  • 1
    Apparently the script is much older and less incompatible then I thought. I recommend to look for other alternatives, e.g. [init.d script from BigBlueButton](http://code.google.com/p/bigbluebutton/downloads/detail?name=red5-ubuntu) looks good - be sure to check variables in the script to see if they are relevant for your system. – jnv Nov 02 '11 at 10:55