New scripts

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
10,628
Location
LT, EU
Already included into DA :) Search in /usr/local/directadmin/scripts
 
Last edited:
We have a new script called user_to_reseller.sh now (used to convert user to reseller) :)

Installation:
Code:
cd /usr/local/directadmin/scripts
wget http://www.servermonkeys.com/projects/els/directadmin/user_to_reseller.sh
chmod 700 user_to_reseller.sh
chown diradmin:diradmin user_to_reseller.sh
Usage:
Code:
cd /usr/local/directadmin/scripts
./user_to_reseller.sh <user>
 
Last edited:
reseller_to_user.sh is done too :) Installation is the same, just change user_to_reseller.sh with reseller_to_user.sh :) Usage is:
Code:
cd /usr/local/directadmin/scripts
./reseller_to_user.sh <user> <reseller>
 
Last edited:
Can you confirm that these scripts work with all operating systems

In particular freebsd.
 
Yes, it is working on all systems that DirectAdmin supports.
 
File names has been changed :)

P.S. jlandes, jw00dy and hehachris, thank you for the good words :)
 
error user_to_reseller.sh

Martynas,


I seem to be having problems with the user_to_reseller script.

When download & use i get this error.
Code:
[root@tws1 scripts]# chown diradmin:diradmin user_to_reseller.sh
[root@tws1 scripts]# ls -al user_to_reseller.sh
-rwx------  1 diradmin diradmin 5303 Jul  4 21:37 user_to_reseller.sh
[root@tws1 scripts]# ./user_to_reseller.sh stambomen
Re-configuring user directory /home/stambomen.
Re-configuring DirectAdmin files.
./user_to_reseller.sh: line 91: syntax error near unexpected token `newline'
./user_to_reseller.sh: line 91: `       echo -n "" > '
[root@tws1 scripts]#

Am i doing something wrong?

Please advise

//Hans
*edit*
I figured out i made a bad move because i needed to move the user to a reseller :s
Is there any way to convert it back or move the user to a reseller ?
*/edit*
 
Last edited:
is there any way i can convert the reseller back to user?

Now the user is stated as Reseller and thats not what i want
 
is there any way i can convert the reseller back to user?

I think it has already been answered.

smtalk said:
reseller_to_user.sh is done too :) Installation is the same, just change user_to_reseller.sh with reseller_to_user.sh :) Usage is:
Code:
cd /usr/local/directadmin/scripts
./reseller_to_user.sh <user> <reseller>

HanSieT said:
Now the user is stated as Reseller and thats not what i want

Then what did you want because that is what move_user_to_reseller.sh does?

smtalk said:
We have a new script called user_to_reseller.sh now (used to convert user to reseller)
 
@Floyd,

I ment to move user to another reseller but instead i made the user reseller :) and thats not what supposed to be.

It was my own mistake because i thought the user to reseller was the one to use:D


Thank u i now used reseller to user .

//Hans

*edit*
When i use reseller to user it says
[root@tws1 scripts]# ./reseller_to_user.sh stambomen pronet
Reseller stambomen is already user. Can not continue.


But in DA it says
Usertype reseller

What am i doing wrong here?

*/edit*
 
Last edited:
HanSieT, use user_to_reseller.sh to restore everything what's needed and then run reseller_to_user.sh.

And about that error (here is the fix):
Code:
cd /usr/local/directadmin/scripts
rm -f user_to_reseller.sh
wget http://www.servermonkeys.com/projects/els/directadmin/user_to_reseller.sh[FONT=monospace]
[/FONT]chmod 700 user_to_reseller.sh[FONT=monospace]
[/FONT]chown diradmin:diradmin user_to_reseller.sh
 
Hey,

I tried the move_domain.sh on a CentOS 4.x box and ended up with a 404 error on the domain.

Looking at things I noticed the "domainowners" file was not updated with the new owner of the domain.

Also, the contents of the httpd.conf file for the domain was not moved to the new owners httpd.conf file. (The paths and User/Group from the old owner needs to be updated as well.)

I also restarted Apache after the changes.

Hope that makes sense!

All seemed to work OK after those changes.

Nice work and Thanks!.

David
 
Hi skruf, thank you for good words :) The file has been updated (added one change for /etc/virtual/domainowners file). For httpd.conf changes - you just needed to run:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

I've added that to the script too :) So, it's perfect now, isn't it? ;)
 
Hi skruf, thank you for good words :) The file has been updated (added one change for /etc/virtual/domainowners file). For httpd.conf changes - you just needed to run:
Code:
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

I've added that to the script too :) So, it's perfect now, isn't it? ;)

You got that right.... Moved a couple of domains without any issues!

Nice work. Thanks again!

David
 
Could this be added to the DA official scripts?

And more important, if in case it is added, will a DA update retrieve these scripts automatically?
 
Back
Top