Skip to content

Commit

Permalink
Merge pull request #24 from morind/master
Browse files Browse the repository at this point in the history
build: publish artefact on bintray automatically
  • Loading branch information
cityzendata authored Dec 22, 2017
2 parents 309060d + 7bacee5 commit ef3a567
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ project(':sensision') {
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')

publications = [ 'sensisionService' ]
publish = true

pkg {
repo = 'generic'
Expand Down Expand Up @@ -393,6 +394,7 @@ project(':sensision-lib') {
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey') : System.getenv('BINTRAY_API_KEY')

publications = [ 'sensisionlib' ]
publish = true

pkg {
repo = 'maven'
Expand Down
12 changes: 8 additions & 4 deletions sensision/src/main/shell/sensision.init
Original file line number Diff line number Diff line change
Expand Up @@ -325,26 +325,30 @@ start() {
#
# Start..
#
su "${SENSISION_USER}" -c "${JAVA_HOME}/bin/java -Xmx${SENSISION_HEAP} ${SENSISION_OPTS} -Dsensision.config=${SENSISION_CONFIG} -cp ${SENSISION_CP} ${SENSISION_CLASS} >> ${SENSISION_HOME}/logs/nohup.out 2>&1 & echo $! > ${PID_FILE}"
su "${SENSISION_USER}" -c "${JAVA_HOME}/bin/java -Xmx${SENSISION_HEAP} ${SENSISION_OPTS} -Dsensision.config=${SENSISION_CONFIG} -cp ${SENSISION_CP} ${SENSISION_CLASS} >> ${SENSISION_HOME}/logs/nohup.out 2>&1 & echo \$! > ${PID_FILE}"

if [ ! -e ${PID_FILE} ]; then
if [ ! -e ${PID_FILE} ] || [ "`su \"${SENSISION_USER}\" -c \"${JAVA_HOME}/bin/jps -lm|grep -wE $(cat ${PID_FILE})|cut -f 1 -d' '\"`" == "" ]; then
echo "Start failed !"
rm -f ${PID_FILE}
exit 1
fi
}

stop() {
if [ -e ${PID_FILE} ] && [ "`su \"${SENSISION_USER}\" -c \"${JAVA_HOME}/bin/jps -lm|grep -wE $(cat ${PID_FILE})|cut -f 1 -d' '\"`" != "" ]; then
kill `su "${SENSISION_USER}" -c "${JAVA_HOME}/bin/jps -lm|grep -wE $(cat ${PID_FILE})|cut -f 1 -d' '"`
rm -f ${PID_FILE}
else
echo "No instance of Sensision is currently running"
fi
rm -f ${PID_FILE}
}

status() {
if [ -e ${PID_FILE} ]; then
if [ -e ${PID_FILE} ] && [ "`su \"${SENSISION_USER}\" -c \"${JAVA_HOME}/bin/jps -lm|grep -wE $(cat ${PID_FILE})|cut -f 1 -d' '\"`" != "" ]; then
su "${SENSISION_USER}" -c "${JAVA_HOME}/bin/jps -lm|grep -wE $(cat ${PID_FILE})"
else
echo "No instance of Sensision is currently running"
exit 1
fi
}

Expand Down

0 comments on commit ef3a567

Please sign in to comment.