Current time: 04-19-2024, 09:27 AM Hello There, Guest! (LoginRegister)


Post Reply 
[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: #1
[HOWTO] Using the CLI to manage ispcp via command line (scripts)
I wanted to create create a set of tools to be able to create/modify/delete domains from the command line.
This approach is really practical when doing migrations from other control panels, for example, with the list of domains+passwords, you'd be able to replicate the system in a few minutes.
There is some documentation about usage at the dokuwiki here.
For any suggestions, modifications of the code,etc .. post it here or edit the wiki, so it can be useful for us all

Contributing code
If you want to test and improve the most current code, you can connect to:
http://bitbucket.org/aseques/ispcp-cli/src

UPDATE
Fixed alias creation
Added mail password change option
Change default for dns creation to protected=no

See CHANGELOG to view the full list of changes

It's designed to work at least with the current 1.0.7 (there are older working versions too)
You can call it something like:
php domain.php --action create_domain --created_by "reseller" --domain "example.com" --password "password25" --hosting_plan "FullPlan"
To create the hosting for the domain example.com using the template FullPlan and with the admin password password25, note that when creating a domain, the name of the admin and the domain will be the same (due to the script limitations)
or
php domain.php --action create_ftp --created_by "reseller" --domain "example.com" --password "password25" --hosting_plan "FullPlan" --user "username"
To create the ftp account username@example.com for the previous domain.

To check the usual syntax of many of the commands, you can user the verify_cli.sh that will create a sample domain with most of the features..

It has been extensively tested, and it shouldn't break anything.
For anyone interested in using the script, I'm not a programmer so the code probably will hurt your eyes, any advice will be taken into consideration.
I hope it will be of use to you.

UPDATE: The admins closed the original post, the only valid source for 1.0.7 versions is the one in this post
The version for 1.0.7 and current trunk
.gz  scripts_1_0_7.tar.gz (Size: 14.49 KB / Downloads: 13)
10-28-2011 08:51 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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