title: monit does not find the unicorn worker in production server
body: <p>I'm using this gem for deploy <a href="https://github.com/ivalkeen/kapify" rel="nofollow">kapify</a>.</p>
  
  <p>This is my unicorn config:</p>
  
  <p><a href="https://github.com/ivalkeen/kapify/blob/master/lib/kapify/unicorn/configuration.rb" rel="nofollow">unicorn config</a></p>
  
  <p><a href="https://github.com/ivalkeen/kapify/blob/master/lib/generators/kapify/unicorn/templates/unicorn.rb.erb" rel="nofollow">unicorn.rb.erb</a></p>
  
  <p><a href="https://github.com/ivalkeen/kapify/blob/master/lib/generators/kapify/unicorn/templates/unicorn_init.erb" rel="nofollow">unicorn_init.erb</a></p>
  
  <p>I have in my deploy:</p>
  
  <pre><code>server "111.111.111.111", :web, :app, :db, primary: true
  
  set :application, 'myapp'
  set :user, "hyperrjas"
  set :deploy_to, "/home/#{user}/apps/#{application}"
  set :deploy_via, :remote_cache
  set :use_sudo, false
  
  set :scm, "git"
  set :repository, "path_to_my_remote_reposytory.git"
  set :branch, "master"
  set :current_path, "/home/#{user}/apps/#{application}/current"
  set :shared_path, "/home/#{user}/apps/#{application}/shared"
  
  set :unicorn_workers, 1
  set :unicorn_pid, "#{shared_path}/pids/unicorn.pid"
  set :server_name, "myserver.com"
  </code></pre>
  
  <p>this is my pid in remote server:</p>
  
  <pre><code>ps aux | grep unicorn
  1000      6037  0.4 12.5 320464 127628 ?       Sl   14:09   0:37 unicorn master -c /home/hyperrjas/apps/myapp/shared/config/unicorn.rb -D                                                         
  1000      6079  0.2 13.8 335784 140828 ?       Sl   14:10   0:17 unicorn worker[0] -c /home/hyperrjas/apps/myapp/shared/config/unicorn.rb -D                                                      
  1000      6322  0.0  0.0   9384   868 pts/0    S+   16:14   0:00 grep unicorn
  </code></pre>
  
  <p>this is my <code>config/deploy/templates/monit/unicorn.erb</code> file:</p>
  
  <pre><code>check process myapp_unicorn with pidfile /home/hyperrjas/apps/myapp/current/tmp/pids/unicorn.pid
  start program = "/etc/init.d/unicorn_myapp start"
  stop program = "/etc/init.d/unicorn_myapp force-stop"
  
  check process myapp_unicorn_worker_0 with pidfile /home/hyperrjas/apps/myapp/current/tmp/pids/unicorn.0.pid
  start program = "/bin/true"
  stop program = "/usr/bin/test -s /home/hyperrjas/apps/myapp/current/tmp/pids/unicorn.0.pid &amp;&amp; /bin/kill -QUIT `cat /home/hyperrjas/apps/myapp/current/tmp/pids/unicorn.0.pid`"
  if mem &gt; 200.0 MB for 5 cycles then restart
  if cpu &gt; 50% for 15 cycles then restart
  if 5 restarts within 25 cycles then timeout
  alert myapp@gmail.com only on { pid }
  if changed pid 2 times within 64 cycles then alert
  </code></pre>
  
  <p>I can see in monit the next path to unicorn worker pid:</p>
  
  <pre><code>Pid file /home/hyperrjas/apps/myapp/current/tmp/pids/unicorn.0.pid
  </code></pre>
  
  <p>And the message:</p>
  
  <pre><code>Status  Not monitored
  </code></pre>
  
  <p>The unicorn pid in remote server are in <code>/home/myapp/apps/myapp/current/tmp/pids/unicorn.pid</code></p>
  
  <p>I can not see the pid <code>unicorn.0.pid</code> in <code>/home/hyperrjas/apps/myapp/current/tmp/pids/</code></p>
  
  <p>Monit is monitoring fine the unicorn pid.</p>
  
  <p><strong>How can I monitorize with monit my unicorn worker?.</strong></p>