title: restarting httpd service in bash script not working
body: <p>I created a bash script to switch between using Apache and Varnish</p>
  
  <p>But the commands of restarting the httpd service not working RECENTLY</p>
  
  <p>the script was working fine before months</p>
  
  <pre><code>#!/bin/bash
  
  echo "Switching between Apache and Varnish cache"
  
  if grep -Fxq "apache_port=0.0.0.0:80" /var/cpanel/cpanel.config
  then
      sed -i '/apache_port/c\apache_port=0.0.0.0:8080' /var/cpanel/cpanel.config
  else
      sed -i '/apache_port/c\apache_port=0.0.0.0:80' /var/cpanel/cpanel.config
  fi
  
  /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings &amp;&amp;
  /scripts/rebuildhttpdconf &amp;&amp;
  service httpd restart &amp;&amp;
  service varnish restart &amp;&amp;
  
  echo "Done"
  </code></pre>
  
  <p>I don't know Why the restarting oof httpd is not working exactly</p>