diff --git a/README.md b/README.md index e941f82..2b109e6 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ supervisor::app { 'your-app-title': directory => 'Path where your command will be run', # required user => 'User to execute this app', # Defaults to root environment => 'Hash map of environment variables to be used by your program', # Defaults to undef + numprocs => 'Number of processes to start', # Defaults to undef startsecs => 'The total number of seconds which the program needs to stay running after a startup to consider the start successful', # Defaults to undef stopwaitsecs => 'The number of seconds to wait for the OS to return a SIGCHILD to supervisord after the program has been sent a stopsignal', # Defaults to undef priority => 'The relative priority of the program in the start and shutdown ordering', # Defaults to undef diff --git a/manifests/app.pp b/manifests/app.pp index 3464206..030f32e 100644 --- a/manifests/app.pp +++ b/manifests/app.pp @@ -3,6 +3,7 @@ $command, $directory, $user = 'root', + $numprocs = undef, $startsecs = undef, $stopwaitsecs = undef, $priority = undef, diff --git a/templates/supervisor.conf.erb b/templates/supervisor.conf.erb index c6fd224..a2840eb 100644 --- a/templates/supervisor.conf.erb +++ b/templates/supervisor.conf.erb @@ -5,6 +5,9 @@ user=<%= @user %> autostart=true autorestart=true redirect_stderr=True +<%- if @numprocs -%> +numprocs=<%= @numprocs %> +<%- end -%> <%- if @startsecs -%> startsecs=<%= @startsecs %> <%- end -%>