Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- LIB=/home/icon/gpsTracksService/build
- CONFIG=/home/icon/services/devices
- JAVA="/usr/bin/java"
- CLASSPATH="/home/icon/services/devices/devices.jar:$LIB/commons-dbcp-1.2.2.jar:$LIB/commons-logging-1.0.2.jar:$LIB/commons-pool-1.5.4.jar:$LIB/gson-1.5.jar:$LIB/gtsdb.jar:$LIB/gtsutils.jar:$LIB/jdbc-postgresql.jar:$LIB/log4j-1.2.15.jar:$LIB/org.springframework.asm-3.0.2.RELEASE.jar:$LIB/org.springframework.beans-3.0.2.RELEASE.jar:$LIB/org.springframework.context-3.0.2.RELEASE.jar:$LIB/org.springframework.core-3.0.2.RELEASE.jar:$LIB/org.springframework.expression-3.0.2.RELEASE.jar:$LIB/wartools.jar:applicationContext.xml"
- SERVER_NAME="devices"
- SLOG_NAME="devices"
- PID_FILE="/var/run/${SLOG_NAME}.pid"
- start() {
- ebegin "Starting devices"
- ${JAVA} -classpath "${CLASSPATH}" com.rexintegra.gps.tracks.processing.MainProcessingUnit &
- javaPID=$!
- echo "'${SERVER_NAME}' backgrounded with process id '${javaPID}'"
- echo ${javaPID} > ${PID_FILE}
- eend $? "Failed to start devices"
- }
- stop() {
- ebegin "Stopping devices"
- start-stop-daemon --stop \
- --pidfile ${PID_FILE}
- eend $? "Failed to stop devices"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement