HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Not Cleaned Up after Client Deletion (http://www.howtoforge.com/forums/showthread.php?t=60070)

fatbear 30th December 2012 15:26

Not Cleaned Up after Client Deletion
 
After I deleted a website, I noted the following still remained:

/var/spool/mail/web11
/var/www/php-fcgi-scripts/web11

Note that in testing this issue, I only created a website and waited for it to come into existence, then deleted it, and then observed what was not cleaned up.

These should have been deleted during the website deletion, right?

till 30th December 2012 18:11

The file in spool is not created by ispconfg, so ispconfig will not remove it. The directory /var/www/php-fcgi-scripts/web11 shall be deletecd by ispconfig. Have you tested this in 3.0.5, its most likely been fixed there already.

fatbear 30th December 2012 19:09

Hi Till,

Thanks for the reply. I haven't tested it in the non-stable 3.0.5 release. But, I'll take that as a push to my placing some domains that I keep around for testing purposes to put them on a server permanently for the purpose of testing ISPConfig svn code.

Do you happen to know what command that ISPConfig invokes that is responsible for creating the /var/spool/mail/<webid> directory? And, is there a hook in the code that I can use during website deletion to write some code that can take care of the cleanup?

As an aside, I really need to figure out how to start writing such code. Perhaps the learning curve to being an ISPConfig developer has discouraged me so far. Maybe you can point me at some resources that will help jump start me to writing such things. :)

Again, thanks for everything you do for all of us!

Almost... Happy New Year!

till 30th December 2012 23:30

Quote:

Do you happen to know what command that ISPConfig invokes that is responsible for creating the /var/spool/mail/<webid> directory? And, is there a hook in the code that I can use during website deletion to write some code that can take care of the cleanup?
Maybe the useradd command sends a welcome email on your system or similar. Take a look whats in the mail file.

Quote:

And, is there a hook in the code that I can use during website deletion to write some code that can take care of the cleanup?
ISPConfig backend is event based, so you can hook your code to the event "web_domain_delete" by creating a custom plugin.
Example:

$app->plugins->registerEvent('web_domain_delete',$this->plugin_name,'my_delete_function');


All times are GMT +2. The time now is 09:25.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.