Quantcast
Channel: iRedMail — iRedMail Support
Viewing all articles
Browse latest Browse all 12092

iRedAPD init script LSB compliance

$
0
0

======== 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


Viewing all articles
Browse latest Browse all 12092

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>