Current time: 04-20-2024, 02:04 AM Hello There, Guest! (LoginRegister)


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

Posts: 326
Joined: Mar 2007
Reputation: 0
Post: #11
RE: Using the CLI with ispcp (wiki article)
You php script can just include the existing /var/www/ispcp/gui/include/ispcp-lib.php, and then use any of the functions that the GUI is using to create the users.

Something else to think about is that you need to specify what reseller to create the domain under. Smile

-
pgentoo
05-16-2009 03:01 AM
Find all posts by this user
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #12
RE: Using the CLI with ispcp (wiki article)
(05-16-2009 03:01 AM)pgentoo Wrote:  You php script can just include the existing /var/www/ispcp/gui/include/ispcp-lib.php, and then use any of the functions that the GUI is using to create the users.
Yep, already done that ..

Quote:Something else to think about is that you need to specify what reseller to create the domain under. Smile
Already done that too, passing the created_by it does a lookup into the database to know wich is the reseller...

php new_domain.php --created_by "test" --admin_name "example.com" --admin_pass "pas122"

When I'm done polishing the stuff I'll post the source here ...
05-18-2009 11:23 PM
Find all posts by this user
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #13
RE: Using the CLI with ispcp (wiki article)
Well, I finally have a working script, I wanted to post it into this thread, but apparently I cannot post anything that ends with .tgz neither .dist
If anyone know if it's possible to post it I'll will, meanwhile, if anyone would like to test, please PM me so I can send the files.
05-22-2009 01:09 AM
Find all posts by this user
sci2tech Away
Senior Member
****

Posts: 1,285
Joined: Jan 2007
Reputation: 23
Post: #14
RE: Using the CLI with ispcp (wiki article)
You can save using following extensions: .tar, .gz, .tar.gz, tar.bz2
05-22-2009 01:23 AM
Visit this user's website Find all posts by this user
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #15
RE: Using the CLI with ispcp (wiki article)
Hey, I just uploaded a new version of this little script to manage your domains.
It's in a very early state, but it should break nothing (at least it didn't happen to me).
Just drop it anywhere you want, edit the config.php to to adapt to your environment and it should be working.

At this point you should be able to:
.- Create domains with the given hosting plan
.- Create the default ftp (examplecom@example.com) for a given domain
.- nothing else Tongue

If someone wants to try, I'll be glad to hear some advise, I'm not a programmer, so not much confident of the way I'm doing this ...

Cheers
05-29-2009 02:58 AM
Find all posts by this user
inev Offline


Posts: 1
Joined: Mar 2009
Reputation: 0
Post: #16
RE: Using the CLI to manage ispcp (scripts)
scripts.tar.gz 0 Kb please post again
07-29-2009 07:26 PM
Find all posts by this user
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #17
RE: Using the CLI to manage ispcp via command line (scripts)
Updated the script again. This time I've added support for 1.0.3 and to be able of adding mail
Enjoy
(This post was last modified: 09-11-2009 02:49 AM by aseques.)
09-10-2009 06:39 PM
Find all posts by this user
aseques Offline
Member
*****
Dev Team

Posts: 330
Joined: May 2008
Reputation: 4
Post: #18
RE: Using the CLI to manage ispcp via command line (scripts)
Ok, there's a new update in case anyone is interested. I am approaching the plesk to ispcp migration and developing all the methods I need to to the migration.
Added
.- fix_htdocs_owner: So the htdocs folder can be owned by the vu20xx (otherwise apache cannot read it)
.- create_mail_alias: With this function you can create a new mail address usera@domain.com pointing to userb@domainb.com

The already existant methods:
.- create_domain
.- create_ftp
.- create_mail

I am working on another function to be able to create domain alias. When that's done I'll be able to migrate from plesk finally.

If anyone is interested, just drop a PM to me, in any case I'll release the whole script when I'm done with the migration.
10-02-2009 11:25 PM
Find all posts by this user
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #19
RE: Using the CLI to manage ispcp via command line (scripts)
Thanx aseques

I'm sure there will be some lost souls who want to migrate from another panel to ispcp and your script will help them.

/J
10-02-2009 11:35 PM
Visit this user's website Find all posts by this user
polysign Offline
Junior Member
*

Posts: 13
Joined: Oct 2009
Reputation: 0
Post: #20
RE: Using the CLI to manage ispcp via command line (scripts)
I hope I am not missing something, but is it possible that the addmail function does not work yet, as it does not write the password somewhere is belongs?

If you don't mind I will try and put my dirty fingers in your code Smile

And THX, it's exactly the script I was looking for to finally start migrating from another panel.
10-26-2009 04:38 AM
Find all posts by this user
Thread Closed 


Forum Jump:


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