Advertisement
Guest User

Untitled

a guest
Feb 21st, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. description "CoSo TeamUp Zuora Order Processing Service"
  2. author "Adrian Arias"
  3.  
  4. start on runlevel [23]
  5. stop on shutdown
  6.  
  7. setuid teamup
  8. setgid teamup
  9.  
  10. #expect fork
  11. respawn
  12.  
  13. env DEFAULTFILE=/etc/default/zuora-order-processor
  14.  
  15. pre-start script
  16. # stop the job from continuing if the config file is not found.
  17. [ ! -f "$DEFAULTFILE" ] && { stop; exit 0; }
  18.  
  19. # source the config file
  20. . "$DEFAULTFILE"
  21.  
  22. # stop the job from continuing if the service is expressly disabled.
  23. [ -z "$ENABLED" ] && { stop; exit 0; }
  24.  
  25. # with this commented, upstart complains. When uncommented, main class cannot be found.
  26. logger -i -t "$UPSTART_JOB" "INFO: ENABLED=$ENABLED, CLASSPATH=$CLASSPATH"
  27. end script
  28.  
  29. script
  30. if [ -f "$DEFAULTFILE" ]; then
  31. . "$DEFAULTFILE"
  32. fi
  33.  
  34. # logger -i -t "$UPSTART_JOB" "INFO: ENABLED=$ENABLED, CLASSPATH=$CLASSPATH, OPTS=$OPTS"
  35. java $OPTS com.nextuc.services.ZuoraOrderProcessor >> /var/log/teamup/services/zuora-order-processor.log 2>&1
  36.  
  37. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement