ispCP - Board - Support
[HOWTO] Using the CLI to manage ispcp via command line (scripts) - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Howtos (/forum-41.html)
+--- Thread: [HOWTO] Using the CLI to manage ispcp via command line (scripts) (/thread-4255.html)

Pages: 1 2 3 4 5 6 7


RE: Using the CLI with ispcp (wiki article) - pgentoo - 05-16-2009 03:01 AM

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


RE: Using the CLI with ispcp (wiki article) - aseques - 05-18-2009 11:23 PM

(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 ...


RE: Using the CLI with ispcp (wiki article) - aseques - 05-22-2009 01:09 AM

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.


RE: Using the CLI with ispcp (wiki article) - sci2tech - 05-22-2009 01:23 AM

You can save using following extensions: .tar, .gz, .tar.gz, tar.bz2


RE: Using the CLI with ispcp (wiki article) - aseques - 05-29-2009 02:58 AM

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


RE: Using the CLI to manage ispcp (scripts) - inev - 07-29-2009 07:26 PM

scripts.tar.gz 0 Kb please post again


RE: Using the CLI to manage ispcp via command line (scripts) - aseques - 09-10-2009 06:39 PM

Updated the script again. This time I've added support for 1.0.3 and to be able of adding mail
Enjoy


RE: Using the CLI to manage ispcp via command line (scripts) - aseques - 10-02-2009 11:25 PM

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.


RE: Using the CLI to manage ispcp via command line (scripts) - joximu - 10-02-2009 11:35 PM

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


RE: Using the CLI to manage ispcp via command line (scripts) - polysign - 10-26-2009 04:38 AM

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.