title: 2 questions, cron job not running restart, kill not gracefully restarting
body: <p>I put the following cron job in my root crontab under var/spool/cron </p>
  
  <pre><code>*/5 * * * * service php-fpm-5.5.11 restart
  </code></pre>
  
  <p>I see it called in the cron logs every 5 minutes, so I know it is being called, but it is not restarting php-fpm.  </p>
  
  <pre><code>Question 1:
    Is there a different way to restart services when calling them in cron?     
    What would be the correct way to call this restart?
  </code></pre>
  
  <p>Another question and the root of the problem is I have another call that runs every night that sometimes kills my website altogether because php-fpm is not restarting correctly:</p>
  
  <pre><code>/bin/kill -SIGUSR1 `cat /opt/pifpm/php-5.5.11/var/run/php-fpm.pid 2&gt;/dev/null`  2&gt;/dev/null || true
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>[12-Jul-2015 00:52:29] ERROR: An another FPM instance seems to already listen on /opt/pifpm/fpmsockets/5.5.11.sock
  [12-Jul-2015 00:52:29] ERROR: FPM initialization failed
  
  Question 2
    Is there a better way to call the kill statement? For instance:
  
  [ ! -f /opt/pifpm/php-5.5.11/var/run/php-fpm.pid ] || kill -USR2 `cat /opt/pifpm/php-5.5.11/var/run/php-fpm.pid`
  </code></pre>
  
  <p>This is an nginx and centos setup.</p>
  
  <p>Here is a portion of the cron log:</p>
  
  <pre><code>Jul 15 12:15:01 insp CROND[7325]: (root) CMD (service php-fpm-5.5.11 restart)
  Jul 15 12:15:01 insp CROND[7326]: (root) CMD (/usr/local/cpanel/scripts/recoverymgmt &gt;/dev/null 2&gt;&amp;1)
  Jul 15 12:15:01 insp CROND[7327]: (root) CMD (/usr/local/cpanel/bin/dcpumon &gt;/dev/null 2&gt;&amp;1)
  Jul 15 12:15:01 insp CROND[7332]: (root) CMD (/usr/local/cpanel/scripts/autorepair recoverymgmt &gt;/dev/null 2&gt;&amp;1)
  Jul 15 12:15:01 insp CROND[7333]: (root) CMD (/usr/local/cpanel/bin/dbindex &gt;/dev/null 2&gt;&amp;1)
  Jul 15 12:16:53 insp /usr/bin/crontab[7530]: (root) BEGIN EDIT (root)
  Jul 15 12:16:57 insp /usr/bin/crontab[7530]: (root) END EDIT (root)
  Jul 15 12:20:01 insp CROND[7842]: (root) CMD (/usr/lib64/sa/sa1 1 1)
  Jul 15 12:20:01 insp CROND[7845]: (root) CMD (/usr/local/cpanel/bin/dcpumon &gt;/dev/null 2&gt;&amp;1)
  Jul 15 12:20:01 insp CROND[7846]: (root) CMD (service php-fpm-5.5.11 restart)
  Jul 15 12:20:01 insp CROND[7847]: (root) CMD (/usr/local/maldetect/maldet --mkpubpaths &gt;&gt; /dev/null 2&gt;&amp;1)
  </code></pre>