Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Imaginary WHMCS module
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Imaginary WHMCS module

elgselgs Member
edited September 2015 in General

I have been thinking of an imaginary WHMCS module for sometime. Now I'd like to share my idea, and am hoping to hear what you think.

Essentially WHMCS controls its fellow servers to do the following things:

  1. Create accounts;
  2. Terminate accounts;
  3. Suspend accounts;
  4. Resume accounts;

I know WHMCS does much more like accounting, billing and a lot more, but let's just now talk about the servers.

So the imaginary module will just call some shell scripts like:

  1. pre_creating_account.sh, post_creating_account.sh
  2. pre_terminating_account.sh, post_terminating_account.sh
  3. pre_suspending_account.sh, post_suspending_account.sh
  4. pre_resuming_account.sh, post_resuming_account.sh

with appropriate parameters, and the rest will be left to the shell script to do the real job.

With this module, you can do pretty much everything you want just by implementing your logic in these hook shell scripts. You can manage ftp accounts, database accounts, vpn accounts and etc. and etc..

This is my idea about this imaginary module, your thoughts?

Comments

  • So effectively, you'd be able to get the post_create_account.sh file to upload, let's say, the latest Wordpress core, create a database (assuming the panel had API hooks for that), then install it?

    Sounds interesting..

  • That already exists... just trying to remember where it is as it was 3-4 years ago I got a hold of it.

  • @DeanKamitsis said:
    So effectively, you'd be able to get the post_create_account.sh file to upload, let's say, the latest Wordpress core, create a database (assuming the panel had API hooks for that), then install it?

    Sounds interesting..

    Right, these are actually service lifecycle hooks. You can do pretty much anything you want in these hooks.

  • Just be careful when passing and processing variables in shell scripts.

  • Just little sanitizing, that's all.

  • AnthonySmithAnthonySmith Member, Patron Provider

    MartinD said: That already exists... just trying to remember where it is as it was 3-4 years ago I got a hold of it.

    I have been looking for such a module for about 4 - 5 years haha.

    I have written one that is fairly similar but my php skillz are like 2/10 at best, if someone writes it though I will be all over it like a rash!

  • You can use their hooks system.

    http://docs.whmcs.com/Hooks:PreModuleCreate

    http://docs.whmcs.com/Hooks:AfterModuleCreate

    It's all there. Creating, suspending, terminating, and more. Just stick what you want into the hooks folder.

    Thanked by 1elgs
  • AnthonySmithAnthonySmith Member, Patron Provider

    http://docs.whmcs.com/Hooks:AfterModuleCreate

    It's all there. Creating, suspending, terminating, and more. Just stick what you want into the hooks folder.

    you missed the 'my php skills are 2/10' part obviously because frankly that documentation is fucking terrible to my eyes.

    Thanked by 2elgs BharatB
  • @Steven_F said:
    It's all there. Creating, suspending, terminating, and more. Just stick what you want into the hooks folder.

    This. I've tried some of their hooks and feel WHMCS is quite dev friendly. You just write whatever code you like and link it to WHMCS with a simple function.

  • BharatBBharatB Member, Patron Provider

    Interesting...., Ill try :)

Sign In or Register to comment.