• Inviting everyone who uses WordPress management tools in Plesk
    The Plesk team is conducting a 60-minute research session that includes an interview and a moderated usability test.
    To participate, please use this link .
    Your experience will help shape product decisions and ensure the tools better support real-world use cases.

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