Initial import
This commit is contained in:
18
get_sum_of_defined_domain_quotas.sh
Executable file
18
get_sum_of_defined_domain_quotas.sh
Executable file
@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
mysql=false
|
||||
mysql_credentilas="--login-path=local"
|
||||
mysql_db=postfix
|
||||
|
||||
echo ""
|
||||
if $mysql ; then
|
||||
sum_quota_mb=`mysql $mysql_credentilas $mysql_db -N -s -e "SELECT SUM(quota) FROM domain"`
|
||||
else
|
||||
sum_quota_mb=`su - postgres -c"psql postfix -t -q -c\"SELECT sum(quota) FROM domain\""`
|
||||
fi
|
||||
echo -e "\t$sum_quota_mb MB"
|
||||
echo ""
|
||||
|
||||
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user