Current time: 05-05-2024, 06:09 AM Hello There, Guest! (LoginRegister)


Thread Closed 
[HOWTO] Using the CLI to manage ispcp via command line (scripts)
Author Message
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #41
RE: [HOWTO] Using the CLI to manage ispcp via command line (scripts)
(03-17-2010 09:40 AM)rethus Wrote:  I have found a little bug into your scripts. Not an prgramming-bug... its an logical BUG.
I have installed ispCP and configured it to only set hosting-plans on Admin - not on Reseller.
Why would you want this? If you company grows up, then you will have some non-technical person to be your resseller to do burocracy stuff, while you are the admin user for the technical stuff.
Also this is the way it worked in plesk one the days I was using it (8.2.smtng)
Quote:If i use your Script, i have to add --created_by and --hosting_plan. And its only works, if the Hosting_Plan was created by the user who is named on --created_by.

But this is no logical assignment. Cause if i add all my plesk-customers i had to add them to the admin (cause reseller don't have own hosting_plans.

But ispCP don't can assign users from (or to) admin. This is also a logical misstake of ispCP, cause a user have to be also assignable from reseller back to admin... or from admin to reseller....

I solve my Problem with changing your domain.php...

Change this line:
Code:
$result = $mysqli->query("SELECT `props` FROM `hosting_plans` WHERE `name`='$hosting_plan' AND `reseller_id`='$created_by'");

into:

Code:
$result = $mysqli->query("SELECT `props` FROM `hosting_plans` WHERE `name`='$hosting_plan'");

Quote:So my next Question is... how did you set all the User-Details (adress, name and so on)?
I see some variables into your script, but seems they doesn't accessaible from outside?
These are not mandatory, so I just left them empty so I had a more general script. If you want to add them It's ok fine for me, I'll gladly accept the patches.

A couple of important things:
.- I forgot to add the getopts.php (it's just a code snippet so you can use longopts in php-cli) taken from the php example codes. Please redownload the code and check again. (there's also some new stuff like htaccess creation)
.- You CAN add hosting plans to the reseller, I am doing it normally with a SQL query like this:
INSERT INTO `hosting_plans` VALUES ('',RESELLER_ID,'Personal','_no_;_no_;0;-1;5;1;-1;-1;2048;200;_no_;_no_','Hosting plan','0.00','0.00','','',0);
where RESELLER_ID is the reseller id. Also you can switch to the reseller and create the plans from there.


NOTE: I'd like to know what is the layout of your users, everyone has it's own reseller?
I just updated the page on http://www.isp-control.net/documentation...mmands_cli with the latest updates of the CLI scripts.
Now there's also a complete example to create a working domain.
(This post was last modified: 03-17-2010 07:44 PM by aseques.)
03-17-2010 06:56 PM
Find all posts by this user
Thread Closed 


Messages In This Thread
RE: Using the CLI with ispcp - aseques - 05-08-2009, 11:26 PM
RE: [HOWTO] Using the CLI to manage ispcp via command line (scripts) - aseques - 03-17-2010 06:56 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)