Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.14 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. LIB=/home/icon/gpsTracksService/build
  4. CONFIG=/home/icon/services/devices
  5. JAVA="/usr/bin/java"
  6. 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"
  7. SERVER_NAME="devices"
  8. SLOG_NAME="devices"
  9. PID_FILE="/var/run/${SLOG_NAME}.pid"
  10.  
  11. start() {
  12.     ebegin "Starting devices"
  13.      ${JAVA} -classpath "${CLASSPATH}" com.rexintegra.gps.tracks.processing.MainProcessingUnit &
  14.      javaPID=$!
  15.      echo "'${SERVER_NAME}' backgrounded with process id '${javaPID}'"
  16.      echo ${javaPID} > ${PID_FILE}
  17.      
  18.     eend $? "Failed to start devices"
  19. }
  20.  
  21. stop() {
  22.     ebegin "Stopping devices"
  23.     start-stop-daemon --stop \
  24.         --pidfile ${PID_FILE}
  25.                
  26.     eend $? "Failed to stop devices"
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement