
30th September 2012, 12:47
|
|
Junior Member
|
|
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
IPSCONFIG 3 Multiserver - No replicate
My setup is multiserver with the following architecture:
- Master Server dedicated to the only use of ISPConfig
- Web Server
- Mail Server
- Server DB
I created a script that automatically creates the proforma billing module on the master server.
This script also checks the expiry date and if the due date is less than today's date control and disable or delete the services that the customer has subscribed to.
I have taken as an example the queries that are used for the remoting-client.
However, the server employees are not automatically updated
what is the correct procedure to use for you to be updated?
|

30th September 2012, 19:09
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,181 Times in 3,200 Posts
|
|
Does your script use the ISPConfig API to update the records or do you access the mysql database directly? To get data replicated in the cluster, all changes have been done trogh the ispconfig remote API.
|

30th September 2012, 19:46
|
|
Junior Member
|
|
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I use ispconfig class not remote api so the query are directly to database
$app->db->query($sql)
Last edited by stefanmcds-mnt; 30th September 2012 at 19:49.
|

30th September 2012, 23:05
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,181 Times in 3,200 Posts
|
|
The query function affects only the local database, thats not the function to change any settings in the database that shall be replicated. If you want to use the local api, then you have to use the datalogInsert, datalogUpdate and datalogDelete functions. But the recommended way is to use the remote api as thats the only way to ensure that sour scripts eill work with the next ispconfig version.
|

1st October 2012, 08:59
|
|
Junior Member
|
|
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
So I should use the remote API directly from ISPConfig master call using localhost?
I think that it is not the concept for which they have been implemented with the remote API
The same is true if you wanted to implement a module to simplify my management and then renderi public for the community releasing it under the GPL does not mean that this module will work for future versions of ISPConfig
So if I wanted to give this script, made for the billing module, dispoinibile to the development team for the final implementation in future versions of release as I do?
However, I will try to usarte functions datalog meanwhile wondering how I can do to use directly on the remote server ISPConfig master bees using localhost as the server and if they work with this configuration
|

1st October 2012, 10:04
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,181 Times in 3,200 Posts
|
|
This depends on the kind of script you are writing. If the scrit is a intergated part of ispconfig, e.g. a module or plugin, then use the internal API. If its a external script, then use the remote api.
If code is part of ispconfig and hosted in the svn server of the ispconfig project an released under the BSD license, then we take care that it works with future versions of ispconfig api. If you release it unser a dfferent license like GPL or host it elsewere, then you might have to take care yourself that your code works in a new version.
Just a note as you mentioned the billing module above. Please dont mix up the billing module and ispconfig code, the billing module is not a part of the ispconfig open source version and none of the billing module code may be published.
Last edited by till; 1st October 2012 at 10:11.
|

2nd October 2012, 18:05
|
|
Junior Member
|
|
Join Date: Sep 2009
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Can you explain an example to use remote internal function
|

3rd October 2012, 12:35
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,872
Thanks: 689
Thanked 4,181 Times in 3,200 Posts
|
|
The remote functions are for external scripts as I explained in #6. Using them in internal scripts is possible of course but its not recommended, the usage is exactly the same then using them from external scripts. There are many examples in the ispconfig tar.gz file.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 11:51.
|
Recent comments
11 hours 34 min ago
14 hours 30 min ago
15 hours 44 min ago
17 hours 7 min ago
18 hours 45 min ago
20 hours 14 min ago
21 hours 27 min ago
1 day 13 hours ago
1 day 14 hours ago
1 day 18 hours ago