Results 1 to 3 of 3

Thread: Custom Usage Report creation

  1. #1
    Join Date
    Jul 2019
    Posts
    42

    Question Custom Usage Report creation

    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

  2. #2
    Join Date
    Apr 2005
    Location
    GMT +7.00
    Posts
    13,577
    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;
    Regards, Alex G.

    - Get the best commercial DirectAdmin support and hire me on poralix.com
    - Follow and like @Poralix on Facebook

  3. #3
    Join Date
    Jul 2019
    Posts
    42
    Dear Alex,

    Thanks a lot you are great

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •