• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Turning off Python for ALL sites (10.4.4)

aWEBthatWORKS

New Pleskian
I've been advised to turn off Python server-wide, since we don't have any sites which are using it. I've removed it from the service plans and re-synced, but not sure the best way to double check any which may be locked. Is there any way I can get a list of every domain which has Python enabled, other than clicking through each one? Perhaps via MySql?
Any help would be hugely appreciated!
 
Started to answer my own question. I can get a list of all the locked ones under Subscribers, they all start with the lock icon. However, I'm having trouble finding the setting to actually turn Python off for those ones, barring unlocking and resyncing them.
 
Is there any way I can get a list of every domain which has Python enabled, other than clicking through each one? Perhaps via MySql?
Any help would be hugely appreciated!

select name from domains where id=(select dom_id from hosting where python='true');
 
Ten disable Python for all domains where it is enabled with
# mysql -uadmin --skip-column-names -p`cat /etc/psa/.psa.shadow` psa -e "select name from domains where id=(select dom_id from hosting where python='true');" | awk -F \| '{print $1}' | while read a; do /usr/local/psa/bin/domain -u $a -python false; done
 
Back
Top