title: How to use subprocess.call to restart a service in linux?
body: <p>I want to restart nginx using subprocess.call. I'm using </p>
  
  <pre><code>subprocess.call("sudo systemctl restart nginx",shell=True)
  </code></pre>
  
  <p>However, when using <code>shell=True</code> the command didn't do anything while, I'm using <code>shell=False</code> it said no directory or files "command I implemented the subprocess.call in a button.</p>