diff --git a/postgres-size-report b/postgres-size-report index d8a9432..ee1b2b6 100755 --- a/postgres-size-report +++ b/postgres-size-report @@ -33,16 +33,14 @@ cd ~postgres echo "" echo "************* Candlepin Tablesizes *************" echo "" -echo $TABLEQUERY | sudo -u postgres psql -d candlepin - +echo $TABLEQUERY | su - postgres -c "psql candlepin" echo "" echo "************** Foreman Tablesizes **************" echo "" -echo $TABLEQUERY | sudo -u postgres psql -d foreman - +echo $TABLEQUERY | su - postgres -c "psql foreman" -if PULPCORE_TABLESIZES=$(echo $TABLEQUERY | sudo -u postgres psql -d pulpcore 2>/dev/null) +if PULPCORE_TABLESIZES=$(echo $TABLEQUERY | su - postgres -c "psql pulpcore" 2>/dev/null) then echo "" echo "************** Pulpcore Tablesizes *************" @@ -50,7 +48,6 @@ then echo "$PULPCORE_TABLESIZES" fi - echo "" echo "*************** FileSystem Usage ***************" echo ""