Custom Usage Report creation

itcms

Verified User
Joined
Jul 4, 2019
Messages
105
Location
Athens
Hi,

I want to make a report for
User , Contact Email, domain(s), Package, Reseller

How can do that ?

Which command to execute ?

BR
Antonis
 
Hello Antonis,

All the requested information is stored in text files: /usr/local/directadmin/data/users/*/user.conf

So you will need to do a loop and collect all needed data and format it. Something like this:

Code:
for USER in $(cat /usr/local/directadmin/data/users/*/users.list | sort | uniq); do \
echo "${USER};$(grep ^email= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);\
$(cat /usr/local/directadmin/data/users/${USER}/domains.list | xargs);\
$(grep ^package= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);\
$(grep ^creator= /usr/local/directadmin/data/users/${USER}/user.conf | cut -d= -f2);"; \
done;
 
Back
Top