Skip to content

Commit

Permalink
Add nice and limit_open_files support for Upstart 0.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
jordansissel committed Oct 25, 2016
1 parent ed1564a commit a87bc8a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions templates/upstart/0.6.5/init.conf
Expand Up @@ -4,9 +4,11 @@ stop on runlevel [!2345]

respawn
umask {{{umask}}}
#nice {{{nice}}}
#chroot {{{chroot}}}
#chdir {{{chdir}}}
{{#nice}}nice {{{nice}}}
{{/nice}}{{#limit_open_files}}limit nofile {{{limit_open_files}}} {{{limit_open_files}}}
{{/limit_open_files}}chroot {{{chroot}}}
chdir {{{chdir}}}

#limit core <softlimit> <hardlimit>
#limit cpu <softlimit> <hardlimit>
#limit data <softlimit> <hardlimit>
Expand Down Expand Up @@ -36,7 +38,7 @@ end script
{{/prestart}}

script
[ -r {{{default_file}}} ] && . {{{default_file}}}
[ -r {{{sysconfig_file}}} ] && . {{{sysconfig_file}}}
[ -r "{{{default_file}}}" ] && . "{{{default_file}}}"
[ -r "{{{sysconfig_file}}}" ] && . "{{{sysconfig_file}}}"
exec chroot --userspec {{{user}}}:{{{group}}} {{{chroot}}} {{{program}}} {{{shell_args}}} >> {{ log_path_stdout }} 2>> {{ log_path_stderr }}
end script

0 comments on commit a87bc8a

Please sign in to comment.