Jump to content

Limiting server resources by storage used as opposed to account quantity


Recommended Posts

Hi folks,

Upon adding our first server to WHMCS I can see the maximum number of accounts option. While this would be great if we were only offering packages with very similar resource allocations, that isn't the case. Is it possible to set the maximum based on the storage used on the server instead?

Thanks in advance 🙂

Cheers,
Robert @ dotScot

Link to comment
Share on other sites

What you could do at the developer level is on AfterCronjob hook, get all active services for all servers you want to limit in such a way.  Run through each server's services and total up their disk space usage.  The WHMCS/Service/Service object gives the diskusage.  (Note, the server module used must support usageupdate functions)  Then if the server is at the max, set the server's max accounts to the current active accounts.  Thus you stay within the stock control built-in but also get your cake.  An addon would be the best method here so that you can control which servers or server groups get this limiting. 

The Server Allocator by Modulesgarden may allow doing this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated