Current time: 11-26-2024, 01:07 AM Hello There, Guest! (LoginRegister)


Post Reply 
[IspCP] - Command Line -
Author Message
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #1
[IspCP] - Command Line -
Hi ! Smile

I want to know if it's possible to use IspCP by command line and not use the GUI interface ?

Command line :
- Add/update/delete User
- Add/update/delete email/ftp/sql account

Thx for answer Smile

Ryu !
07-11-2007 11:55 PM
Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #2
RE: [IspCP] - Command Line -
I not sure - never tested Rolleyes

mmhh, you can create your own Script to write into the DB and later execute the engines. Could work...

Greez BeNe
07-12-2007 03:40 AM
Visit this user's website Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #3
RE: [IspCP] - Command Line -
all you need to do is:
make changes in the database
tell the daemon to run the requests (see gui/include/ispcp-functions.php)
07-12-2007 05:55 AM
Visit this user's website Find all posts by this user Quote this message in a reply
adigit Offline
Junior Member
*

Posts: 68
Joined: Apr 2007
Reputation: 0
Post: #4
RE: [IspCP] - Command Line -
sounds interesting to turn a CP into commandline
07-12-2007 11:47 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #5
RE: [IspCP] - Command Line -
Hi ! i've tried to execute IspCP by command line ! Tongue

For example .. to add ad domain, i executed this sql request :
Code:
INSERT INTO domain (domain_id,domain_name,domain_gid,domain_uid,domain_admin_id,domain_created_id,d​omain_created,domain_last_modified,domain_mailacc_limit,domain_ftpacc_limit,doma​in_traffic_limit,domain_sqld_limit,domain_sqlu_limit,domain_status,domain_alias_​limit,domain_subd_limit,domain_ip_id,domain_disk_limit,domain_disk_usage,domain_​php,domain_cgi,domain_egw) VALUES (316,"test.fr",2377,2377,319,2,1182504245,0,0,0,0,0,0,"toadd",0,0,1,0,114802,"yes","yes","yes") ;

and then, i called in my terminal :
Code:
perl /var/www/ispcp/engine/ispcp-rqst-mngr

Result :
- all DNS files are well created
- all files & dir under /var/www/virtual is also well created
- same for for virtual ahost section in /etc/apache/site-available/ispcp.conf

But in the GUI interface ... my domain is accompagnated with a Red square .. and when i try to change with identity of my domain, i arrive on antoher domain created in my ispcp.

So i think i have done a mistake in my sql request and particulary with one of these fields :
- domain_admin_id
- domain_created_id
- domain_created

I don't know who it is wrong ^^


Another thing i have to ask you, ihave my first domain on ispcp :
Code:
| domain_id | domain_name      | domain_gid | domain_uid | domain_admin_id | domain_created_id | domain_created | domain_last_modified | domain_mailacc_limit | domain_ftpacc_limit | domain_traffic_limit | domain_sqld_limit | domain_sqlu_limit | domain_status | domain_alias_limit | domain_subd_limit | domain_ip_id | domain_disk_limit | domain_disk_usage | domain_php | domain_cgi | domain_egw |
+-----------+------------------+------------+------------+-----------------+-------------------+----------------+----------------------+----------------------+---------------------+----------------------+-------------------+-------------------+---------------+--------------------+-------------------+--------------+-------------------+-------------------+------------+------------+------------+
|       315 | mail.fullhost.fr |       2376 |       2376 |             319 |                 2 |     1182504245 |                    0 |                    0 |       0 |                    0 |                 0 |                 0 | ok            |                  0 |                 0 |            1 |                 0 |     114802 | yes        | yes        | yes        |


Why domain_admin_id is incremente by +4 of domain_id ?
Maybe it's the one of the source of the problem because i use the same id for my request sql of domain "test.fr" ... Big Grin


Thx for answer :!:

Ryu ! Smile
07-12-2007 05:58 PM
Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #6
RE: [IspCP] - Command Line -
after that :

a "select * from domain" give this result :
Code:
|       316 | test.fr          |       2377 |       2377 |             319 |                 2 |     1182504245 |                    0 |                    0 |       0 |                    0 |                 0 |                 0 | setfmode() | ERROR: Unknown user 'vu2377' ! |                  0 |                 0 |            1 |                 0 |            114802 | yes        | yes        | yes        |

so ... there is a trouble with the creation of the user Big Grin
07-12-2007 06:10 PM
Find all posts by this user Quote this message in a reply
raphael Offline
Member
***

Posts: 474
Joined: Apr 2007
Reputation: 8
Post: #7
RE: [IspCP] - Command Line -
first of all, you shouldn't call the requests manager when the daemon is running, bad things may occur.
Second, if it is a domain it means that a user account must be created. The 'admins' table contains that information.

The other way to do this is to use php-cli, so the same php scripts used by the GUI can be used to do all that stuff.
07-13-2007 02:22 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Ryuuku Offline
Junior Member
*

Posts: 55
Joined: Apr 2007
Reputation: 0
Post: #8
RE: [IspCP] - Command Line -
ah ok Big Grin

I'm going to search for this file ! Smile
Thx for the information ! Smile

Ryu !
07-13-2007 05:31 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)