1 (edited by marek.skubela 2013-06-24 18:11:12)

Topic: iRedAPD init script LSB compliance

======== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 12.04.2
- Related log if you're reporting an issue:
====

Hello, I've been setting up iRedMail with pacemaker and discovered iRedAPD init.d script is not LSB compliant [1].

iRedAPD:

  • when the service is stopped, status should return 3, returns 0,

  • when the service pid exists, but the service is stopped, status should return 1, returns 0.

It is a really tiny, low-priority issue, but also something that can be fixed easily. I'm not a bash expert, but modifying status function helped:

status() {
    if [ -f ${PIDFILE} ]; then
        PID="$(cat ${PIDFILE})"
        s="$(check_status ${PID})"

        if [ X"$s" == X"running" ]; then
            echo "${PROG} is running."
            unset s
            exit 0
        else
            echo "${PROG} is stopped."
            unset s
            exit 1
        fi
    else
        echo "${PROG} is stopped."
        exit 3
    fi
}

[1] http://refspecs.linux-foundation.org/LS … ptact.html

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: iRedAPD init script LSB compliance

Fixed moment ago: https://bitbucket.org/zhb/iredapd/commi … 31aae5cc1f
Thanks very much for your feedback. smile