Rebuild reseller's user.list difficulties

d_noizeshakerz

Verified User
Joined
Dec 8, 2013
Messages
16
Hi all,

I tried running the following bash taken from https://docs.directadmin.com/direct...how-to-rebuild-all-resellers-users-list-files

But getting the following error. May someone shed some light on why this is the case?

Code:
fix.sh: command substitution: line 5: unexpected EOF while looking for matching `"'
fix.sh: command substitution: line 6: syntax error: unexpected end of file

The code:

Code:
#!/bin/sh

cd /usr/local/directadmin/data/users

for r in `ls */reseller.conf | cut -d/ -f1`; do
{
     echo "fixing Reseller $r ...";

     echo -n '' > $r/users.list

     for u in `grep "^creator=$rquot; */user.conf | cut -d/ -f1`; do
     {
         ISUSER=`grep -c usertype=user $u/user.conf`
         if [ "$ISUSER" = "1" ]; then
             echo $u >> $r/users.list
         fi
     };
     done;
};
done;
 
Are you sure you've copied all the code there? It may be incomplete.
 
Hi Smtalk,

Thanks for responding! Yes, I did. Multiple times in fact, and verified it more than one time.
 

Attachments

  • Screenshot_57.png
    Screenshot_57.png
    23.6 KB · Views: 6
Are you sure you've copied all the code there? It may be incomplete.

I've copied the code from this thread and it works for rebuilding the corrupted reseller's lists file:


Clearly, there are differences in the code. I.e line 11. You may want to update the code snippet in the DA docs

Thanks!
 
Back
Top