Posts by fulltilt

    I have created a small bash-script which check and deletes obsolete php-fpm configs (from phpswitcher bug) via cron job.

    Functions:

    - backup of the config files to be deleted

    - delete obsolete php-fpm config files

    - restart of phpswitcher PHP services

    - E-Mail notification


    Use at your own risk - please test in a V-Box before use it!


    Suggestions for improvement are welcome.


    usage:

    apt install mailutils

    nano /root/check-php-conf.sh

    copy & paste the script below

    set your imscp database user & password, email and backup path

    chmod + x /root/check-php-conf.sh

    run /root/check-php-conf.sh via cron job (period 5-15 minutes)


    ## edit ##

    added missing /root path to the awk line ;-)


    2 of my systems are quite busy (about 10000 email accounts & many Office 365 connections) with permanently high number of processes (500-600) the system load is still ok but it's increase very quickly when there is a lot of traffic via Apache and at the same time too many Dovecot mysql querys ...

    Is there any way to completely outsource the mailserver including database for Dovecot, Roundcube etc. using the listener files?

    How does an external installation work and what is needed?

    Do all customers in the panel have to be switched to external MX and do they all need an MX entry set in IMSCP DNS (I use external nameservers PDNS)?

    Do I have to completely install IMSCP on the external system or which packages do I have to install?

    I guess the hostname would then probably also have to be changed?

    Can anyone share some details on how to outsource the mail server with IMSCP?

    for now I use monit to monitor the php services pid ... this needs to be adjusted depending use of packaged or compiled php version ... added to /etc/monit/monitrc

    the part for removal of the fpm-customer.conf files seems to be missing when the account is completely deleted by an admin or reseller, it works only when a alias or subdomain are deleted from the clientarea. Maybe an extra listener file for admin /reseller user_delete actions could be added to solve this issue?

    Code
    1. sub _deleteObsoleteFpmConfig
    2. {
    3. ....
    4. my $rs = iMSCP::File->new( filename => $phpVersion->{'version_fpm_pool_directory_path'} . "/$moduleData->{'DOMAIN_NAME'}.conf" )->delFile();
    5. ....
    6. }

    could this be the same issue caused by an outdated remove() function?

    see:

    1.5.3-2018120800 - Can't locate object method "remove" via package "iMSCP::File" (iMSCP::Service core library)


    Service.pm from 2018120800 still use the remove() function ....

    Code
    1. iMSCP::File->new( filename => $jobFilePath )->remove();
    2. should be:
    3. iMSCP::File->new( filename => $jobFilePath )->delFile();


    yep, seems the /fpm/pool.d/customer.conf still exist in some cases when a customer account was deleted ...

    any idea how to fix that issue?