Last active
October 9, 2015 02:28
-
-
Save neilalbrock/3424467 to your computer and use it in GitHub Desktop.
Railo Start/Stop/Restart Script
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 | |
# Starts, stops, and restarts Railo | |
RAILO_DIR="/opt/railo" | |
JAVA_OPTS_MAIN="-DSTOP.PORT=8887 -DSTOP.KEY=railo -jar" | |
JAVA_OPTS_AGENT="-javaagent:lib/ext/railo-inst.jar" | |
JAVA_OPTS_MEM="-Xms256M -Xmx512M" | |
JAVA_OPTS_JAR="start.jar" | |
case $1 in | |
start) | |
echo "Starting Railo" | |
cd $RAILO_DIR | |
java $JAVA_OPTS_MAIN $JAVA_OPTS_MEM $JAVA_OPTS_AGENT $JAVA_OPTS_JAR & | |
;; | |
stop) | |
echo "Stopping Railo" | |
cd $RAILO_DIR | |
java $JAVA_OPTS_MAIN $JAVA_OPTS_JAR --stop | |
;; | |
restart) | |
$0 stop | |
sleep 1 | |
$0 start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" >&2 | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There was also some complaining about a lack of a Java Agent in my setup, so that option has also been added.