Posts by UncleJ

    Hello,


    I set up the a listener like described here but when updating system I get following error message:

    Code
    1. [FATAL] iMSCP::EventManager::_init: Bad name after afterSetupRestartServices' at /etc/imscp/listeners.d/80_postsrsd_config.pl line 99, <$fh> line 388.Compilation failed in require at /var/www/imscp/engine/PerlLib/iMSCP/EventManager.pm line 164, <$fh> line 388.E: Problem executing scripts DPkg::Post-Invoke 'if [ -x /usr/local/sbin/imscp-dpkg-post-invoke.pl -a ${IMSCP_SETUP:=0} -eq 0 ]; then /usr/bin/perl /usr/local/sbin/imscp-dpkg-post-invoke.pl -d; fi'E: Sub-process returned an error codeFailed to perform requested operation on package. Trying to recover:


    The code in line 98 - 102 is:

    Code
    1. if(defined $main::execmode && $main::execmode eq 'setup) {
    2. iMSCP::Eventmanager->getInstance()->register('afterSetupRestartServices', \&postsrsListener);
    3. } else {
    4. iMSCP::EventManager->getInstance()->register(['afterMtaAddDmn', 'afterMtaAddSub', 'afterMtaDelDmn', 'afterMtaDelSub'], \&postsrsListener);
    5. }

    I already checked the name of the sub and the name of the trigger twice but I get no clue why this happens.
    Hope somebody can give me a cue where to search.


    Regards Jörg

    Hello,


    I would like to know which would be the best way to interact with a service not handled by iMSCP? Do I have to use iMSCP::Execute for service XYZ reload or is there a better way doing this? I want to reload postsrsd service with the listener.
    Thanks in advance for any feedback.


    Regards Jörg

    Hello,


    I want to create a listener for configuring Postsrsd. The idea is to query the database for all available domains/subdomain/aliases with

    and to concat this to a string as parameter of postsrsd config.
    Generally this is no problem but I am wondering which trigger might be the best for starting the query as this would afterwards also trigger the reload as postsrsd. I was thinking about using afterNamedReload but that would trigger the listener every time a zone gets changed. Normally I just need the trigger when a new domain/subdomain/alias is added or deleted in order to reduce the reload commands towards postsrsd. If there is no special trigger which would fit this need, is it possible to register a listener to more than one trigger at the same time?
    Thanks in advance for your feedback.


    Regards Jörg