Red5 restart

On the 2d server is a restart script at /usr/local/restart-sync-server.sh. The script has to be ran as root or with sudo rights. The Red5 server will run as user 'red5'.

To run:

ssh yourusername@2d.mobile.evtek.fi
sudo /usr/local/restart-sync-server.sh

For your convenience heres the script too, if you like to put on some other server

#!/bin/bash

##################################################
#                                                #
# This script MUST be ran with sudo rights.      #
# Be carefull, because all the processes will    #
# be executed which have 'red5' in them, whether #
# that is in the username or execution command,  #
# it will be KILLED. You have been warned..      #
#                                                #
# Script by: Mikko Wuokko                        #
#            <mikko.wuokko@evtek.fi>             #
# Kill-by-username script by:                    #
#            Franky                              #
# Taken from:                                    #
# http://forums1.itrc.hp.com/service/forums/     #
# questionanswer.do?threadId=717782&             #
# admit=-682735245+1173962608769+28353475        #
##################################################

RED5_HOME="/usr/local/red5-0.5"
RED5_USER="red5"

# Kill processes
for i in `ps -aef | grep ${RED5_USER} | grep -v grep | awk '{print $2}'`
do
(echo "Killing $i")
(kill -s 9 $i)
done

# kill -s 15 seems not to be enought to kill the halted  red5 process.. :(

# Restart the Red5 server
su - ${RED5_USER} -c "cd ${RED5_HOME} && ant server &"

Development Development tools

  Page Info My Prefs Log in
This page (revision-4) last changed on 18:24 25-Mar-2017 by Mikko Wuokko.
 

Referenced by
...nobody

JSPWiki v2.4.102
[RSS]