Welcome Guest. Please Login or Register  


You are here: Index > Softaculous Auto Installer > General Support > Topic : Sample Auto Install API for DirectAdmin



Threaded Mode | Print  

 Sample Auto Install API for DirectAdmin (10 Replies, Read 5852 times)
lunny
Group: Member
Post Group: Newbie
Posts: 8
Status:
Hi,

Do you have any sample codes for using the Auto Install API on DirectAdmin?

I found an example for cpanel here http://www.softaculous.com/docs/Auto_Install_API

Do you have a DirectAdmin version with the correct file paths?

thanks.
IP: --   

Sample Auto Install API for DirectAdmin
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 2303
Status:
Hi,

Just change the following code:
Code
$new->login = 'http://user:password@domain.com:2082/frontend/x3/softaculous/index.live.php';
to
Code
$new->login = 'http://user:pass@your.server.com:2222/CMD_PLUGINS/softaculous/index.raw';


-----------------------
Facebook
Twitter
Vote for us
IP: --   

Sample Auto Install API for DirectAdmin
lunny
Group: Member
Post Group: Newbie
Posts: 8
Status:
I couldn't get any response using the following url. Tried pasting it in browser but got redirected to the login page instead.

http://user:pass@your.server.com:2222/CMD_PLUGINS/softaculous/index.raw

Is this the right way to login to DirectAdmin from URL (http://user:pass@your.server.com:2222/) ?
IP: --   

Sample Auto Install API for DirectAdmin
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 2303
Status:
Hi,

Sir this will not work in the browser. You will have to write a code in PHP or any other language to get it working.

Edited by Brijesh : May 10, 2012, 1:42 pm

-----------------------
Facebook
Twitter
Vote for us
IP: --   

Sample Auto Install API for DirectAdmin
lunny
Group: Member
Post Group: Newbie
Posts: 8
Status:
Yes, I tried using the installapi.php that came with the Softaculous installation.

I modified the url in the php file and when I run the script, I got redirected to the Directadmin login page.

Neither running it from script nor pasting the url directly in browser works. Both gets redirected to DirectAdmin login page.
IP: --   

Sample Auto Install API for DirectAdmin
lunny
Group: Member
Post Group: Newbie
Posts: 8
Status:
Manage to get it working through other ways.

Is there any way to know what are the required fields for installing a script through the API? For example, some scripts require fields like site name, site description.. while some others require company name, etc.

IP: --   

Sample Auto Install API for DirectAdmin
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 2303
Status:
Hi,

The required fields are :
Code
$new->data['softdomain'] = 'domain.com';
$new->data['softdirectory'] = 'folder';
$new->data['admin_username'] = 'admin';
$new->data['admin_pass'] = 'qwerty';
The remaining fields are optional and the default values that are suggested on the install form are taken by Softaculous for installation.


-----------------------
Facebook
Twitter
Vote for us
IP: --   

Sample Auto Install API for DirectAdmin
lunny
Group: Member
Post Group: Newbie
Posts: 8
Status:
So there's no way I can call the API to dynamically determine the required fields right?

The only way is to refer to the install form and hardcode the fields when doing the auto install with the API?
IP: --   

Sample Auto Install API for DirectAdmin
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 2303
Status:
Hi,

You can use your code to determine the fields.
For eg: if you want to fill your value in sitename
you can use the following code:
Code
$sitename = 'YOUR VALUE';
$new->data['site_name'] = $sitename;
The variable for Sitename is site_name. You can find the variables in the install.xml of the script.


-----------------------
Facebook
Twitter
Vote for us
IP: --   

Sample Auto Install API for DirectAdmin
security_man
Group: Member
Post Group: Newbie
Posts: 2
Status:
Quote From : lunny May 10, 2012, 5:58 pm
Manage to get it working through other ways.

Is there any way to know what are the required fields for installing a script through the API? For example, some scripts require fields like site name, site description.. while some others require company name, etc.

any way you could be more specific as to how you got it working?  Been pounding my head against it with my directadmin server for a while now too and would be grateful for the help :)
IP: --   

Sample Auto Install API for DirectAdmin
Brijesh
Group: Softaculous Team
Post Group: Super Member
Posts: 2303
Status:
Hi,

Sir we are waiting for your reply on ticket with the login details. We will resolve it asap.

-----------------------
Facebook
Twitter
Vote for us
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is November 27, 2014, 10:41 am.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.547