penguinbliss Posted July 14, 2014 Share Posted July 14, 2014 Hi guys, I wanted to ask this question and thought whmcs forum is the best area for it. I am a system administrator and want to write a bash script to remove all expired and overdue domains in all of our servers. Please note all of our servers are cPanel servers and WHMCS integrated with it, the billing is handling completely in whmcs. Also many scripts for cPanel works along with whmcs, like suspension, terminate account etc we perform via cPanel scripts will be reflected in whmcs. I want to know if there is an easy method to with whmcs+cpanel to collect all expired/overdue domains existed in a server without going to each domains whmcs page and check if it is expired or not. We need to take this audit and remove unwanted accounts to save disk spaces in many of our servers. Please HELP guys!!!!! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 14, 2014 Share Posted July 14, 2014 (edited) I can think of two ways to do this in the Admin Area... 1. go to Clients -> Domain Registrations ... click on Search/Filter tab and select "Expired" from the "Status" dropdown... press "Search" and you should get a list of all of your expired domains. 2. go to Reports -> Domains... tick on the fields you want to include and in one of the filters, select "Status" from the dropdown, "Exact Match" from the middle dropdown and then enter "Expired" into the box. you should then get a list of expired domains - perhaps in a more printable format (if you need to work off a printed list). "overdue" would be a little more complicated depending on when your due date is in relation to its expiry date - maybe by using the invoices report, you could get a list of unpaid invoices and work from there? actually, on further reflection, there is a better solution to overdue - go to billing -> invoices ... search/filter and select "Overdue" from the Status dropdown. Edited July 14, 2014 by brian! 0 Quote Link to comment Share on other sites More sharing options...
penguinbliss Posted July 15, 2014 Author Share Posted July 15, 2014 I can think of two ways to do this in the Admin Area... 1. go to Clients -> Domain Registrations ... click on Search/Filter tab and select "Expired" from the "Status" dropdown... press "Search" and you should get a list of all of your expired domains. 2. go to Reports -> Domains... tick on the fields you want to include and in one of the filters, select "Status" from the dropdown, "Exact Match" from the middle dropdown and then enter "Expired" into the box. you should then get a list of expired domains - perhaps in a more printable format (if you need to work off a printed list). "overdue" would be a little more complicated depending on when your due date is in relation to its expiry date - maybe by using the invoices report, you could get a list of unpaid invoices and work from there? actually, on further reflection, there is a better solution to overdue - go to billing -> invoices ... search/filter and select "Overdue" from the Status dropdown. Seems like you are more knowledged on whmcs stuffs Happy to see your tips for me. I am not that good on whmcs, it is completely handling by billing department, but they asked if any solution to remove all expired/overdue domains completely in servers with the help of details available in whmcs. Thanks once, I will try your solutions and write here if I find any difficulties. Good day 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 15, 2014 Share Posted July 15, 2014 thinking about this further, it may be easier to use the reports - as then you'll be able to export the results to a csv file and you could possibly be used that for your script.. 0 Quote Link to comment Share on other sites More sharing options...
penguinbliss Posted July 15, 2014 Author Share Posted July 15, 2014 thinking about this further, it may be easier to use the reports - as then you'll be able to export the results to a csv file and you could possibly be used that for your script.. Thank you, but how to generate this report?. I don't see any option available in whmcs panel regarding this report. Is that a seperate module or plugin we need to install in whmcs?. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 15, 2014 Share Posted July 15, 2014 Thank you, but how to generate this report?. I don't see any option available in whmcs panel regarding this report. Is that a seperate module or plugin we need to install in whmcs?. no, the reports are a built-in feature of whmcs. from the Admin Area, if you click the "Reports" tab along the top row, you will be taken to the Reports page which shows the available reports. under "Exports", you will see a "Domains" button - either press that to view the domain report, or click the link to "Domains" on the left hand side. tick on the fields you want to include and in one of the filters, select "Status" from the dropdown, "Exact Match" from the middle dropdown and then enter "Expired" into the box. when you press the "Filter" button, it should generate the report - at the bottom of the page, there is a link to "Export to CSV" - clicking on that will save your report output as a csv file. if you want more details about the other available reports, further info can be found in the documentation page - http://docs.whmcs.com/Reports hope that helps. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.