Red5 start/stop script

View: New views
14 Messages — Rating Filter:   Alert me  

Red5 start/stop script

by Michele3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello

I have install red5 by compiling source from svn.

I have juste a red5.sh start script.

When i want to stop red5, i am killing red5 process.

Is there an official start/stop script for this red5 distribution ?

Thanks



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

Re: Red5 start/stop script

by Jeremy Morton-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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

Re: Red5 start/stop script

by Cristian Rusu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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



_______________
Sincerely

Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat Y! messenger: crirus74 Skype: Crirus MSN: crirus@...
Contact Me LinkedinTwitter


On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:
On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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


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

Re: Red5 start/stop script

by Mondain :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.

Paul

On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:
Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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



_______________
Sincerely

Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat Y! messenger: crirus74 Skype: Crirus MSN: crirus@...
Contact Me LinkedinTwitter


On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:
On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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


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




--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/

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

Re: Red5 start/stop script

by Jake Hilton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes you could tweak that script to handle the shutdown like so:

stop)
        echo -n "Shutting down red5"
        echo -n " "
        cd $RED5_DIR
        su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
        sleep 2
        ;;



Jake

On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:
If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.

Paul


On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:
Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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



_______________
Sincerely

Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat Y! messenger: crirus74 Skype: Crirus MSN: crirus@...
Contact Me LinkedinTwitter


On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:
On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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


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




--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/

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



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

Re: Red5 start/stop script

by Andy Shaules :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is a httpservlet method to stop the red5. Of course it may be wise to
check for session credentials. ;)

This is on windows, using .bat


public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{

final ServletOutputStream sos=response.getOutputStream();
String cmd="C:/red5/trunk/dist/red5-shutdown.bat";
Process ls_proc = Runtime.getRuntime().exec(cmd);
final BufferedReader in = new BufferedReader(new
InputStreamReader(ls_proc.getInputStream()));
final BufferedReader in2 = new BufferedReader(new
InputStreamReader(ls_proc.getErrorStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(new
OutputStreamWriter(ls_proc.getOutputStream())), true);

sos.println("stopping red5");
Process ls_proc2 = Runtime.getRuntime().exec(cmd);
new Thread( new Runnable()
{
    public void run()
    {
        try {
        sos.println("Red5 output");
        sos.close();
        String line = "";
        String line2 ="";
        while ((line = in.readLine()) != null || (line2 = in2.readLine()) !=
null) {
            if(line !=null)
            System.out.println(line);
            if(line2 !=null)
            System.out.println(line2);
            System.out.close();
            }
            }catch(Exception e){ System.out.println("Exception"); };
    }
}

).run();

}


----- Original Message -----
From: Jake Hilton
To: red5@...
Sent: Friday, October 30, 2009 9:46 AM
Subject: Re: [Red5] Red5 start/stop script


Yes you could tweak that script to handle the shutdown like so:


stop)
        echo -n "Shutting down red5"
        echo -n " "
        cd $RED5_DIR
        su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
        sleep 2
        ;;




Jake


On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:

If you guys are gonna use the scripts I suggest that you use
red5-shutdown.sh, since this will "cleanly" shut the sever down.


Paul



On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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




_______________
Sincerely
Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat  crirus74  Crirus  crirus@...
Contact Me



On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:

> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?


I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)


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




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






--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/


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







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


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

Re: Red5 start/stop script

by Dominick Accattato-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jake:

I hope you don't mind me posting that script to the wiki: http://trac.red5.org/wiki/AppServer/Startup%20Scripts

If you do mind, I'll remove.

On Fri, Oct 30, 2009 at 12:46 PM, Jake Hilton <red5@...> wrote:
Yes you could tweak that script to handle the shutdown like so:

stop)
        echo -n "Shutting down red5"
        echo -n " "
        cd $RED5_DIR
        su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
        sleep 2
        ;;



Jake

On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:
If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.

Paul


On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:
Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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



_______________
Sincerely

Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat Y! messenger: crirus74 Skype: Crirus MSN: crirus@...
Contact Me LinkedinTwitter


On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:
On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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


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




--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/

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



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



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

Re: Red5 start/stop script

by Dominick Accattato-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

lots of tips and tricks and scripts here... wouldn't want them to get lost in the mix.  Andy, I posted to the wiki, do you mind? http://trac.red5.org/wiki/Servlets/Stopping%20Red5%20From%20a%20Servlet

On Fri, Oct 30, 2009 at 1:06 PM, Andy Shaules <bowljoman@...> wrote:
Here is a httpservlet method to stop the red5. Of course it may be wise to check for session credentials. ;)

This is on windows, using .bat


public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{

final ServletOutputStream sos=response.getOutputStream();
String cmd="C:/red5/trunk/dist/red5-shutdown.bat";
Process ls_proc = Runtime.getRuntime().exec(cmd);
final BufferedReader in = new BufferedReader(new InputStreamReader(ls_proc.getInputStream()));
final BufferedReader in2 = new BufferedReader(new InputStreamReader(ls_proc.getErrorStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(ls_proc.getOutputStream())), true);

sos.println("stopping red5");
Process ls_proc2 = Runtime.getRuntime().exec(cmd);
new Thread( new Runnable()
{
  public void run()
  {
      try {
      sos.println("Red5 output");
      sos.close();
      String line = "";
      String line2 ="";
      while ((line = in.readLine()) != null || (line2 = in2.readLine()) != null) {
          if(line !=null)
          System.out.println(line);
          if(line2 !=null)
          System.out.println(line2);
          System.out.close();
          }
          }catch(Exception e){ System.out.println("Exception"); };
  }
}

).run();

}


----- Original Message ----- From: Jake Hilton
To: red5@...
Sent: Friday, October 30, 2009 9:46 AM
Subject: Re: [Red5] Red5 start/stop script



Yes you could tweak that script to handle the shutdown like so:


stop)
      echo -n "Shutting down red5"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
      sleep 2
      ;;




Jake


On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:

If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.


Paul



On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
      su -s /bin/bash -c "killall -q -u red5 java" 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




_______________
Sincerely
Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat  crirus74  Crirus  crirus@...
Contact Me



On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:

Hello

I have install red5 by compiling source from svn.

I have juste a red5.sh start script.

When i want to stop red5, i am killing red5 process.

Is there an official start/stop script for this red5 distribution ?


I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)


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




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






--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/


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







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

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


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

Re: Red5 start/stop script

by Andy Shaules :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
No I dont mind at all, I tried to register but your main bounced and the wiki gave me error.
----- Original Message -----
Sent: Friday, October 30, 2009 11:43 AM
Subject: Re: [Red5] Red5 start/stop script

lots of tips and tricks and scripts here... wouldn't want them to get lost in the mix.  Andy, I posted to the wiki, do you mind? http://trac.red5.org/wiki/Servlets/Stopping%20Red5%20From%20a%20Servlet

On Fri, Oct 30, 2009 at 1:06 PM, Andy Shaules <bowljoman@...> wrote:
Here is a httpservlet method to stop the red5. Of course it may be wise to check for session credentials. ;)

This is on windows, using .bat


public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{

final ServletOutputStream sos=response.getOutputStream();
String cmd="C:/red5/trunk/dist/red5-shutdown.bat";
Process ls_proc = Runtime.getRuntime().exec(cmd);
final BufferedReader in = new BufferedReader(new InputStreamReader(ls_proc.getInputStream()));
final BufferedReader in2 = new BufferedReader(new InputStreamReader(ls_proc.getErrorStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(ls_proc.getOutputStream())), true);

sos.println("stopping red5");
Process ls_proc2 = Runtime.getRuntime().exec(cmd);
new Thread( new Runnable()
{
  public void run()
  {
      try {
      sos.println("Red5 output");
      sos.close();
      String line = "";
      String line2 ="";
      while ((line = in.readLine()) != null || (line2 = in2.readLine()) != null) {
          if(line !=null)
          System.out.println(line);
          if(line2 !=null)
          System.out.println(line2);
          System.out.close();
          }
          }catch(Exception e){ System.out.println("Exception"); };
  }
}

).run();

}


----- Original Message ----- From: Jake Hilton
To: red5@...
Sent: Friday, October 30, 2009 9:46 AM
Subject: Re: [Red5] Red5 start/stop script



Yes you could tweak that script to handle the shutdown like so:


stop)
      echo -n "Shutting down red5"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
      sleep 2
      ;;




Jake


On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:

If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.


Paul



On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
      su -s /bin/bash -c "killall -q -u red5 java" 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




_______________
Sincerely
Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat  crirus74  Crirus  crirus@...
Contact Me



On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:

Hello

I have install red5 by compiling source from svn.

I have juste a red5.sh start script.

When i want to stop red5, i am killing red5 process.

Is there an official start/stop script for this red5 distribution ?


I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)


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




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






--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/


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







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

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


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

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

Re: Red5 start/stop script

by Dominick Accattato-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

yep, looking into that...

On Fri, Oct 30, 2009 at 3:14 PM, Andy Shaules <bowljoman@...> wrote:
No I dont mind at all, I tried to register but your main bounced and the wiki gave me error.
----- Original Message -----
From: dominick@...
Sent: Friday, October 30, 2009 11:43 AM
Subject: Re: [Red5] Red5 start/stop script

lots of tips and tricks and scripts here... wouldn't want them to get lost in the mix.  Andy, I posted to the wiki, do you mind? http://trac.red5.org/wiki/Servlets/Stopping%20Red5%20From%20a%20Servlet

On Fri, Oct 30, 2009 at 1:06 PM, Andy Shaules <bowljoman@...> wrote:
Here is a httpservlet method to stop the red5. Of course it may be wise to check for session credentials. ;)

This is on windows, using .bat


public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{

final ServletOutputStream sos=response.getOutputStream();
String cmd="C:/red5/trunk/dist/red5-shutdown.bat";
Process ls_proc = Runtime.getRuntime().exec(cmd);
final BufferedReader in = new BufferedReader(new InputStreamReader(ls_proc.getInputStream()));
final BufferedReader in2 = new BufferedReader(new InputStreamReader(ls_proc.getErrorStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(ls_proc.getOutputStream())), true);

sos.println("stopping red5");
Process ls_proc2 = Runtime.getRuntime().exec(cmd);
new Thread( new Runnable()
{
  public void run()
  {
      try {
      sos.println("Red5 output");
      sos.close();
      String line = "";
      String line2 ="";
      while ((line = in.readLine()) != null || (line2 = in2.readLine()) != null) {
          if(line !=null)
          System.out.println(line);
          if(line2 !=null)
          System.out.println(line2);
          System.out.close();
          }
          }catch(Exception e){ System.out.println("Exception"); };
  }
}

).run();

}


----- Original Message ----- From: Jake Hilton
To: red5@...
Sent: Friday, October 30, 2009 9:46 AM
Subject: Re: [Red5] Red5 start/stop script



Yes you could tweak that script to handle the shutdown like so:


stop)
      echo -n "Shutting down red5"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
      sleep 2
      ;;




Jake


On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:

If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.


Paul



On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
      su -s /bin/bash -c "killall -q -u red5 java" 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




_______________
Sincerely
Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat  crirus74  Crirus  crirus@...
Contact Me



On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:

Hello

I have install red5 by compiling source from svn.

I have juste a red5.sh start script.

When i want to stop red5, i am killing red5 process.

Is there an official start/stop script for this red5 distribution ?


I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)


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




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






--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/


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







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

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


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

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



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

Re: Red5 start/stop script

by Andy Shaules :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
That servlet also will start up red5.
 
Lay out 3 or 4 red5 distributions and light one up.
 
Now in the servlet controlled red5 distribution, you will need to hard code some build elements possibly, its been awhile since I deployed this. Also of course, all distributions need well_configured red5.properties to not conflict.
 
After that you can use the master red5 tomcat deployment to start and stop multiple red5 instances using the servlet post/get requests. If I remember right, you can watch the staratup output print into the servlet for as long as you keep it open for the proceesing servlet output thread.
 
 
----- Original Message -----
Sent: Friday, October 30, 2009 12:21 PM
Subject: Re: [Red5] Red5 start/stop script

yep, looking into that...

On Fri, Oct 30, 2009 at 3:14 PM, Andy Shaules <bowljoman@...> wrote:
No I dont mind at all, I tried to register but your main bounced and the wiki gave me error.
----- Original Message -----
Sent: Friday, October 30, 2009 11:43 AM
Subject: Re: [Red5] Red5 start/stop script

lots of tips and tricks and scripts here... wouldn't want them to get lost in the mix.  Andy, I posted to the wiki, do you mind? http://trac.red5.org/wiki/Servlets/Stopping%20Red5%20From%20a%20Servlet

On Fri, Oct 30, 2009 at 1:06 PM, Andy Shaules <bowljoman@...> wrote:
Here is a httpservlet method to stop the red5. Of course it may be wise to check for session credentials. ;)

This is on windows, using .bat


public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{

final ServletOutputStream sos=response.getOutputStream();
String cmd="C:/red5/trunk/dist/red5-shutdown.bat";
Process ls_proc = Runtime.getRuntime().exec(cmd);
final BufferedReader in = new BufferedReader(new InputStreamReader(ls_proc.getInputStream()));
final BufferedReader in2 = new BufferedReader(new InputStreamReader(ls_proc.getErrorStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(ls_proc.getOutputStream())), true);

sos.println("stopping red5");
Process ls_proc2 = Runtime.getRuntime().exec(cmd);
new Thread( new Runnable()
{
  public void run()
  {
      try {
      sos.println("Red5 output");
      sos.close();
      String line = "";
      String line2 ="";
      while ((line = in.readLine()) != null || (line2 = in2.readLine()) != null) {
          if(line !=null)
          System.out.println(line);
          if(line2 !=null)
          System.out.println(line2);
          System.out.close();
          }
          }catch(Exception e){ System.out.println("Exception"); };
  }
}

).run();

}


----- Original Message ----- From: Jake Hilton
To: red5@...
Sent: Friday, October 30, 2009 9:46 AM
Subject: Re: [Red5] Red5 start/stop script



Yes you could tweak that script to handle the shutdown like so:


stop)
      echo -n "Shutting down red5"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
      sleep 2
      ;;




Jake


On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:

If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.


Paul



On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
      su -s /bin/bash -c "killall -q -u red5 java" 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




_______________
Sincerely
Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat  crirus74  Crirus  crirus@...
Contact Me



On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:

Hello

I have install red5 by compiling source from svn.

I have juste a red5.sh start script.

When i want to stop red5, i am killing red5 process.

Is there an official start/stop script for this red5 distribution ?


I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)


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




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






--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/


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







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

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


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

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



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

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

Re: Red5 start/stop script

by Dominick Accattato-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

nice andy thanks for explaining

On Fri, Oct 30, 2009 at 3:37 PM, Andy Shaules <bowljoman@...> wrote:
That servlet also will start up red5.
 
Lay out 3 or 4 red5 distributions and light one up.
 
Now in the servlet controlled red5 distribution, you will need to hard code some build elements possibly, its been awhile since I deployed this. Also of course, all distributions need well_configured red5.properties to not conflict.
 
After that you can use the master red5 tomcat deployment to start and stop multiple red5 instances using the servlet post/get requests. If I remember right, you can watch the staratup output print into the servlet for as long as you keep it open for the proceesing servlet output thread.
 
 
----- Original Message -----
From: dominick@...
Sent: Friday, October 30, 2009 12:21 PM
Subject: Re: [Red5] Red5 start/stop script

yep, looking into that...

On Fri, Oct 30, 2009 at 3:14 PM, Andy Shaules <bowljoman@...> wrote:
No I dont mind at all, I tried to register but your main bounced and the wiki gave me error.
----- Original Message -----
From: dominick@...
Sent: Friday, October 30, 2009 11:43 AM
Subject: Re: [Red5] Red5 start/stop script

lots of tips and tricks and scripts here... wouldn't want them to get lost in the mix.  Andy, I posted to the wiki, do you mind? http://trac.red5.org/wiki/Servlets/Stopping%20Red5%20From%20a%20Servlet

On Fri, Oct 30, 2009 at 1:06 PM, Andy Shaules <bowljoman@...> wrote:
Here is a httpservlet method to stop the red5. Of course it may be wise to check for session credentials. ;)

This is on windows, using .bat


public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{

final ServletOutputStream sos=response.getOutputStream();
String cmd="C:/red5/trunk/dist/red5-shutdown.bat";
Process ls_proc = Runtime.getRuntime().exec(cmd);
final BufferedReader in = new BufferedReader(new InputStreamReader(ls_proc.getInputStream()));
final BufferedReader in2 = new BufferedReader(new InputStreamReader(ls_proc.getErrorStream()));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(ls_proc.getOutputStream())), true);

sos.println("stopping red5");
Process ls_proc2 = Runtime.getRuntime().exec(cmd);
new Thread( new Runnable()
{
  public void run()
  {
      try {
      sos.println("Red5 output");
      sos.close();
      String line = "";
      String line2 ="";
      while ((line = in.readLine()) != null || (line2 = in2.readLine()) != null) {
          if(line !=null)
          System.out.println(line);
          if(line2 !=null)
          System.out.println(line2);
          System.out.close();
          }
          }catch(Exception e){ System.out.println("Exception"); };
  }
}

).run();

}


----- Original Message ----- From: Jake Hilton
To: red5@...
Sent: Friday, October 30, 2009 9:46 AM
Subject: Re: [Red5] Red5 start/stop script



Yes you could tweak that script to handle the shutdown like so:


stop)
      echo -n "Shutting down red5"
      echo -n " "
      cd $RED5_DIR
      su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
      sleep 2
      ;;




Jake


On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:

If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.


Paul



On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:

Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
      su -s /bin/bash -c "killall -q -u red5 java" 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




_______________
Sincerely
Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat  crirus74  Crirus  crirus@...
Contact Me



On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:

On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:

Hello

I have install red5 by compiling source from svn.

I have juste a red5.sh start script.

When i want to stop red5, i am killing red5 process.

Is there an official start/stop script for this red5 distribution ?


I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)


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




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






--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/


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







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

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


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

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



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

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



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

Re: Red5 start/stop script

by Jake Hilton-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't mind at all Dominick.

Jake

On Fri, Oct 30, 2009 at 11:39 AM, Dominick Accattato <dominick@...> wrote:
Jake:

I hope you don't mind me posting that script to the wiki: http://trac.red5.org/wiki/AppServer/Startup%20Scripts

If you do mind, I'll remove.


On Fri, Oct 30, 2009 at 12:46 PM, Jake Hilton <red5@...> wrote:
Yes you could tweak that script to handle the shutdown like so:

stop)
        echo -n "Shutting down red5"
        echo -n " "
        cd $RED5_DIR
        su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
        sleep 2
        ;;



Jake

On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:
If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.

Paul


On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:
Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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



_______________
Sincerely

Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat Y! messenger: crirus74 Skype: Crirus MSN: crirus@...
Contact Me LinkedinTwitter


On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:
On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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


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




--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/

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



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



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



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

Re: Red5 start/stop script

by Dominick Accattato-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Jake!

On Fri, Nov 6, 2009 at 1:45 PM, Jake Hilton <red5@...> wrote:
I don't mind at all Dominick.

Jake


On Fri, Oct 30, 2009 at 11:39 AM, Dominick Accattato <dominick@...> wrote:
Jake:

I hope you don't mind me posting that script to the wiki: http://trac.red5.org/wiki/AppServer/Startup%20Scripts

If you do mind, I'll remove.


On Fri, Oct 30, 2009 at 12:46 PM, Jake Hilton <red5@...> wrote:
Yes you could tweak that script to handle the shutdown like so:

stop)
        echo -n "Shutting down red5"
        echo -n " "
        cd $RED5_DIR
        su -s /bin/bash -c "$RED5_DIR/red5-shutdown.sh &" red5
        sleep 2
        ;;



Jake

On Fri, Oct 30, 2009 at 10:07 AM, Mondain <mondain@...> wrote:
If you guys are gonna use the scripts I suggest that you use red5-shutdown.sh, since this will "cleanly" shut the sever down.

Paul


On Fri, Oct 30, 2009 at 2:45 AM, Cristian Rusu <crirus@...> wrote:
Here is my spin

cd /etc/init.d/
touch red5
chmod 755 red5
vi red5

Paste below code


#! /bin/sh
#
# Author: Jake Hilton <red5@...>
# /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 " "
        su -s /bin/bash -c "killall -q -u red5 java" 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



_______________
Sincerely

Cristian Rusu
==============
www.crilance.com
Web Development & Electronic Publishing
Chat Y! messenger: crirus74 Skype: Crirus MSN: crirus@...
Contact Me LinkedinTwitter


On Fri, Oct 30, 2009 at 11:07, Jeremy Morton <admin@...> wrote:
On Fri, 30 Oct 2009 09:36:56 +0100, Debian User <testpresta@...>
wrote:
> Hello
>
> I have install red5 by compiling source from svn.
>
> I have juste a red5.sh start script.
>
> When i want to stop red5, i am killing red5 process.
>
> Is there an official start/stop script for this red5 distribution ?

I put up a guide about how to make such a script for RedHat-based OSes on
Red5Wiki, here:

http://red5wiki.com/wiki/Installing_and_running_Red5

Anyone writing similar guides for other OSes would be greatly appreciated!
:-)

Best regards,
Jeremy Morton (Jez)

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


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




--
http://gregoire.org/
http://code.google.com/p/red5/
http://code.google.com/p/blue5/

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



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



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



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



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