Skip to content

Instantly share code, notes, and snippets.

@nbeernink
Created November 14, 2017 21:52
Show Gist options
  • Select an option

  • Save nbeernink/f1b2776f53a0a434062e8df0c2d48a7b to your computer and use it in GitHub Desktop.

Select an option

Save nbeernink/f1b2776f53a0a434062e8df0c2d48a7b to your computer and use it in GitHub Desktop.
#!/bin/env python
import subprocess
import json
php_handler_data=json.loads(subprocess.check_output(['plesk','bin','php_handler','--list','-json','true']))
for handler in php_handler_data:
if handler['status'] == 'enabled' and 'x-httpd-lsphp' not in handler['id']:
print handler['id']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment