-
-
Save solomax/22d7c5f58e05c860cdb8 to your computer and use it in GitHub Desktop.
CentOS red5 init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Startup script for Red5 | |
export RED5_HOME=/opt/red5 | |
start_red5="$RED5_HOME/red5.sh" | |
stop_red5="$RED5_HOME/red5-shutdown.sh" | |
start() { | |
echo -n "Starting Red5: " | |
${start_red5} &>/dev/null & | |
echo "done." | |
} | |
stop() { | |
echo -n "Shutting down Red5: " | |
${stop_red5} | |
echo "done." | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
restart) | |
stop | |
sleep 10 | |
start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment