open-nomad/terraform/shared/config/nomad_upstart.conf
2017-05-15 11:56:41 -07:00

23 lines
417 B
Plaintext

description "Nomad"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
console log
script
if [ -f "/etc/service/nomad" ]; then
. /etc/service/nomad
fi
# Make sure to use all our CPUs, because Nomad can block a scheduler thread
export GOMAXPROCS=`nproc`
exec /usr/local/bin/nomad agent \
-config="/etc/nomad.d/nomad.hcl" \
\$${NOMAD_FLAGS} \
>>/var/log/nomad.log 2>&1
end script