Update Plesk package using command line, for already created domains.

11 10 2009

echo “SELECT d.name FROM domains d , Limits L JOIN Limits L2 ON L2.id=L.id WHERE d.limits_id=L.id AND L.value=4194304000 AND L2.limit_name=’disk_space’ AND L2.value=52428800″| mysql -Ns -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa | while read domname ;

do

/usr/local/psa/bin/domain_pref –update $domname -disk_space 100M -max_traffic 8000M;

/usr/local/psa/bin/domain –update $domname -hard_quota 100M;

done

Using the above command/script we can update the package 50M/4GB bandwidth to 100MB/8GB

In the MySQL query you need to give the vale of 50M as bytes ie 50*1024*1024 and bandowth as 4000*1024*1024.


Actions

Information

One response

16 10 2009
Online Stock Trading

Hey, I found your blog while searching on Google. I have a blog on online stock trading, I’ll bookmark your site.

Leave a comment