Advertisement
Guest User

kibana-init

a guest
Jan 27th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. myservice - logstash job file
  2.  
  3. description "Logstash Server"
  4. author "Simon Frid <simon.frid@livelovely.com>"
  5.  
  6. # Stanzas
  7. #
  8. # Stanzas control when and how a process is started and stopped
  9. # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
  10.  
  11. # When to start the service
  12. #start on runlevel [2345]
  13.  
  14. # When to stop the service
  15. #stop on runlevel [016]
  16.  
  17.  
  18. start on ((((filesystem and runlevel [!06]) and started dbus) and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1 or stopped udev-fallback-graphics)) or runlevel PREVLEVEL=S)
  19. stop on runlevel [016]
  20.  
  21.  
  22. # run when the local FS becomes available
  23. #start on local-filesystems
  24. #stop on shutdown
  25.  
  26.  
  27. # Automatically restart process if crashed
  28. respawn
  29.  
  30. # Essentially lets upstart know the process will detach itself to the background
  31. expect fork
  32.  
  33. # Run before process
  34. pre-start script
  35. #[ -d /var/run/myservice ] || mkdir -p /var/run/myservice
  36. echo "Put bash code here"
  37. end script
  38.  
  39. # Start the process
  40. exec sudo -u ubuntu -i /usr/bin/python {{ pillar['kibana-path'] }}/kibana_server.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement