Automation

QUESTION:
Currently, I execute ./red5.sh each time I wish to run the server but I would like for it to automatically start every time the system boots up.

How can I do this?

ANSWER:

We've found this is a pretty good way of going about achieving this: 

sudo chmod 777 /usr/local/red5/red5.sh
sudo chmod 777 /usr/local/red5/red5-debug.sh
sudo chmod 777 /usr/local/red5/red5-shutdown.sh
sudo chmod 777 /usr/local/red5/log/


Prepare script for startup
========================

Create a file called "red5" in /etc/init.d with content from :
https://gist.github.com/rajdeeprath/6f07cfc33c6fc0196f10


Then:
======
cd /etc/init.d
sudo touch red5
sudo chmod 777 red5


Register service
================
sudo /usr/sbin/update-rc.d red5 defaults
sudo /usr/sbin/update-rc.d red5 enable

DONE!!

You can also follow this documentation if you are using Ubuntu.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.