I'm currently trying to get WHMCS' automatic deployment features to play nice with Virtualmin. :)
WHMCS has an up-/downgrade feature for customers. In connection with Virtualmin, this is accomplished by assigning another template and plan to the vserver.
Now, if I wish to differentiate my WHMCS products by Virtualmin vserver features (i.e. a "mail only" product vs. "hosting" vs. "hosting with MySQL" etc.), I have a problem. Changing the vserver's plan does not en/disable the required features...
Would it be possible to add an API call, maybe a parameter to "modify-domain --appy-plan", to have the enabled features of the new plan be enabled in the vserver, and the rest disabled?
I think it would be way more feasible to do that here in Virtualmin, than having to send "enable-feature" / "disable-feature" API calls from WHMCS, forcing them to mirror the feature configuration.
Comments
Submitted by JamieCameron on Mon, 07/04/2011 - 12:17 Comment #1
So are you using templates to define the initial features, or plans? There is an --apply-plan flag to modify-domain , but it only applies plan limits .. it doesn't enable features. It sounds like what you really want is a --apply-template parameter?
Submitted by Locutus on Mon, 07/04/2011 - 12:34 Comment #2
Uuhm... I fear I'm at a loss here.
...How do I use templates again to specify the initially enabled features? :) I can't seem to find any list in there that would allow me to set the features to enable.
I was of the impression that only plans (or the defaults in the "Features and Plugins" page -- depending on a setting in "User interface settings") can be used to do that.
Submitted by JamieCameron on Mon, 07/04/2011 - 14:42 Comment #3
My mistake, it is the plan that specifies the features. I will add a flag to modify-domain to apply features from the new plan ... stay tuned.
Submitted by JamieCameron on Mon, 07/04/2011 - 15:05 Comment #4
Ok, Virtualmin 3.87 will add a --plan-features flag to modify-domain to set features based on those enabled for the current or new plan..
Submitted by Locutus on Mon, 07/04/2011 - 16:23 Comment #5
Two thumbs up for awesomeness! :)
I'll inform the WHMCS guys that they can add that switch. Could you maybe email me the files that need to be changed to admin AT tianet DOT de?
Submitted by JamieCameron on Mon, 07/04/2011 - 18:44 Comment #6
Ok, email sent ..
Submitted by Locutus on Tue, 07/05/2011 - 03:42 Comment #7
Got it, thanks! Will report later when the WHMCS people sent me their fix. :)
Submitted by Locutus on Fri, 07/08/2011 - 04:18 Comment #8
Quick feedback: Script works! :)
Submitted by andreychek on Fri, 07/08/2011 - 09:19 Comment #9
That's great, thanks for the update!