     autorestart             : yes
     startsecs               : 10
     startretries            : 5
-    stopsignal              : options.stopsignal or 'TERM'
+    stopsignal              : 'TERM'
     stopwaitsecs            : 10
     stopasgroup             : yes
     killasgroup             : yes

fs            = require 'fs'
{ isAllowed } = require './grouptoenvmapping'
{ generateCountlySupervisord } = require './countly/generateConfig'


# becareful while editing this function, any change will affect every worker
generateWorkerSection = (app, options = {}) ->

  { supervisord: section } = options

  _.defaults section, {
    numprocs                : options.instances or 1
    numprocs_start          : 0
    directory               : '%(ENV_KONFIG_PROJECTROOT)s'
