Jump to content
  • 0

Custom server modules?


jared555

Question

13 answers to this question

Recommended Posts

  • 0

you could create a custom server socket script that Matt could later implement which really is the best option. That way everything fits in and the features are implemented with everything else. Contact Matt, I am sure he would be more than willing to help.

Link to comment
Share on other sites

  • 0

I have *some* of the ensim commands working from a shell prompt, so shoudl be able to get working from a WHMCS module, but been concentarting on some other business issues recently (and assisting with the Nominet registrar module) so they ensim auto-provisioning took a back seat.

 

Hope to get back onto it after 3.2 is released in a few weeks

Link to comment
Share on other sites

  • 0
I tried to get it working but the guys at Ensim weren't willing to help and I couldn't figure out how to run the commands.

 

I learnt a lot from picking apart the very useful daily admin report at

http://wwd-hosting.net/ensim/

and am picking up python as i go.

 

basically started creating shell scripts to call the .py scripts to add package, add name-based account, suspend account etc.

 

last i looked at it I was struggling with functionality issues with the ensim api - where the functions appear to want different parameters to any documetation i could dig up

 

siteinfo = virthost.getsiteinfo(site)

 

for example, actually requires site-id (as most functions do) not site so becomes ...

 

siteid = virthost.get_site_from_domain(site)

siteinfo = virthost.getsiteinfo(siteid)

 

then you can get at:

{'domain': 'aconix-test.co.uk', 'admin_user': 'aconixtnova', 'admin': 'admin29', 'enabled': '1', 'fstgeneration': '7', 'version': '4.1.0-8.rhel.4ES', 'email': 'aconixtnova%40aconixhosting.com'}

 

 

You can directly call the ensim scripts manually with the right parameters from SSH

 

e.g. /usr/local/bin/DeleteVirtDomain {site-id}

 

you can translate site-id easily enough from domain with

#!/bin/bash

`ls -l -a /home/virtual/ | grep -i "$1"`;

and awking the column etc.

 

some of the functions didnt tidy up behind them very well during testing, hence why I started on making my own scripts as I needed to add

rm -f /etc/virtualhosting/subdomain/$site

rm -rf /etc/httpd/conf/$site.preview

etc for the terminate to be "clean"

 

I was probably trying to be too clever making it from my own code call

virthost.delete_virtual_domain(domain)

 

This then "morphed" into the idea of having a generic script for each WHMCS function so the automation code module was very very simple and easily coded for any control panel, and then drop in different shell scripts that actually do the work...

 

will definately be going back to it, but not for a month or two

 

HTH anyone else trying :)

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
Answer this question...

×   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