Cpanel packages to directadmin packages convertor - bash script?

DewlanceVPS

Verified User
Joined
Oct 3, 2016
Messages
106
Hello,

We need to manually create Hundreds of packages which take lot of time. Only main time killer is manually creating packages because of directadmin conversion tool does not import packages.

However I think its possible to convert packages by using bash script, I am not so good in this but I think it can be achieve by this method by running bash script in packages folder of cpanel.


for packages "ls /var/cpanel/packages"
do cp packages packages.pkg

Put default package codes of directadmin in all packages.pkg file then again run while loop to get value from each cpanel package-name file and add it into directadmin package-name.pkg file (one by one).


(Only important thing is BWLIMIT, QUOTA, Email, Addon, Park domain and all other default value of directadmin is not needed to change.)


Any help?

Thanks.
 
Last edited:
Converter script should convert the packages, if it didn't - it's a bug. Are you sure you restored reseller first, which had no packages? Otherwise if there was no reseller restored, while users where created, they were auto-assigned to "admin" without their packages, as reseller did not exist at that time :)
 
Hello,

It seems like if the existing cPanel account is under root (using Packages created under root), packages do not get transferred. Could you confirm this behavior?

Thanks!
 
Converter script should convert the packages, if it didn't - it's a bug. Are you sure you restored reseller first, which had no packages? Otherwise if there was no reseller restored, while users where created, they were auto-assigned to "admin" without their packages, as reseller did not exist at that time :)

I restored resellers account first but I think as @anson said. It does not restore packages under root accounts and most of packages are created by root account so it does not restore root packages and in result it also does not restore packages of users.
 
Converter script should convert the packages, if it didn't - it's a bug. Are you sure you restored reseller first, which had no packages? Otherwise if there was no reseller restored, while users where created, they were auto-assigned to "admin" without their packages, as reseller did not exist at that time :)

I just found that it restore packages in /usr/local/directadmin/data/users/username/packages/ ;)

But why all packages does not show in DirectAdmin(Admin Level) >> Packages List?
 
I just found that it restore packages in /usr/local/directadmin/data/users/username/packages/ ;)

But why all packages does not show in DirectAdmin(Admin Level) >> Packages List?

Because you're checking reseller packages there, while user ones for username reseller are stored in /usr/local/directadmin/data/users/username/packages/ and are shown from username reseller level (when you login as it) :)
 
Back
Top