Voici un simple script pour tester si red5 est arrêté: Si c’est le cas, alors le script le redémarre (à supposer que red5 a été installé dans le répertoire /red5)

if [ ! "$(pidof java)" ]
#replace with your process name (pidof ....)
then
        echo "ERROR : not running !" ;
        /red5/red5.sh &
else
        echo "OK : java is running"

fi