Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- myservice - logstash job file
- description "Logstash Server"
- author "Simon Frid <simon.frid@livelovely.com>"
- # Stanzas
- #
- # Stanzas control when and how a process is started and stopped
- # See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas#respawn
- # When to start the service
- #start on runlevel [2345]
- # When to stop the service
- #stop on runlevel [016]
- 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)
- stop on runlevel [016]
- # run when the local FS becomes available
- #start on local-filesystems
- #stop on shutdown
- # Automatically restart process if crashed
- respawn
- # Essentially lets upstart know the process will detach itself to the background
- expect fork
- # Run before process
- pre-start script
- #[ -d /var/run/myservice ] || mkdir -p /var/run/myservice
- echo "Put bash code here"
- end script
- # Start the process
- exec sudo -u ubuntu -i /usr/bin/python {{ pillar['kibana-path'] }}/kibana_server.py
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement