Created
September 18, 2013 22:57
-
-
Save mosabua/6616904 to your computer and use it in GitHub Desktop.
Simplistic startup script for Sonatype CLM Server
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/sh | |
SONATYPE_CLM_SERVER_HOME=/opt/tools/sonatype-clm-server | |
VERSION=1.6.0-02 | |
JAVA_OPTIONS="-Xmx1024m -XX:MaxPermSize=128m" | |
do_start() | |
{ | |
cd $SONATYPE_CLM_SERVER_HOME | |
java -jar $JAVA_OPTIONS sonatype-clm-server-$VERSION.jar server config.yml > /dev/null 2>&1 & | |
echo "Started Sonatype CLM Server" | |
} | |
do_console() | |
{ | |
cd $SONATYPE_CLM_SERVER_HOME | |
java -jar $JAVA_OPTIONS sonatype-clm-server-$VERSION.jar server config.yml | |
} | |
do_stop() | |
{ | |
pid=`ps aux | grep sonatype-clm-server | grep -v grep | awk '{print $2}'` | |
kill -9 $pid | |
echo "Killed Sonatype CLM Server - PID $pid" | |
} | |
do_usage() | |
{ | |
echo "Usage: clm [console|start|stop]" | |
} | |
case $1 in | |
console) do_console | |
;; | |
start) do_start | |
;; | |
stop) do_stop | |
;; | |
*) do_usage | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment