Error running listener triggered by 'afterSetupRestartServices' when updating system

  • 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

    (Ubuntu 16.04, i-MSCP 1.5.1, php-Fpm, Plugins: ClamAV, CronJobs, InstantSSH, LetsEncrypt, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, PolicydSPF, Postscreen, RecaptchaPMA, RoundcubePlugins, ServerDefaultPage, SpamAssassin, YubiKeyAuth)

  • @UncleJ


    if(defined $main::execmode && $main::execmode eq 'setup) {


    'setup should be 'setup'


    Note that perl report the error at the time it found it only. Thus, error can be on earlier lines ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Nuxwin,


    thanks for the fast reply - just a second before you wrote I saw it. Wanted to delete the post but seems there is no possibility to do so, or is it?


    Regards.

    (Ubuntu 16.04, i-MSCP 1.5.1, php-Fpm, Plugins: ClamAV, CronJobs, InstantSSH, LetsEncrypt, Mailgraph, Monitorix, OpenDKIM, PhpSwitcher, PolicydSPF, Postscreen, RecaptchaPMA, RoundcubePlugins, ServerDefaultPage, SpamAssassin, YubiKeyAuth)

  • Wanted to delete the post but seems there is no possibility to do so, or is it?

    We don't allow posts deletion ;)

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206