description "Zeppelin"

start on (local-filesystems and net-device-up IFACE!=lo)
stop on shutdown

# Respawn the process on unexpected termination
respawn

# respawn the job up to 7 times within a 5 second period.
# If the job exceeds these values, it will be stopped and marked as failed.
respawn limit 7 5

# Run unprivileged
setuid {{ cdh_zeppelin_user }}
setgid {{ cdh_zeppelin_group }}

pre-start script
    mkdir -p /srv/zeppelin/base_tmp/tmp
end script

# zeppelin was installed in /usr/share/zeppelin in this example
chdir {{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}
exec bin/zeppelin-daemon.sh upstart