Skip to content

Instantly share code, notes, and snippets.

@cemo
Forked from sargun/gist:5693318
Created June 28, 2013 12:54
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cemo/5884472 to your computer and use it in GitHub Desktop.
Save cemo/5884472 to your computer and use it in GitHub Desktop.
description "service"
start on filesystem
stop on runlevel S
respawn
respawn limit 10 5
oom never
kill timeout 86400 #If it's given a stop order, this is how long it will take to stop.
limit nofile 1048576 1048576
setgid <%= owner %>
setuid <%= owner %>
script
exec /usr/bin/java \
$(sed -e '/^[ ]*\/\//d' -e 's|[ ]*//.*| |' -e 's|^| |' /etc/service.jvm.conf | tr -d "\n") \
-jar /opt/service/service.jar \
server /etc/service.yml \
>> /var/log/service/sysout.log 2>&1
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment