Package: apache2.2-common
Version: 2.2.14-3
Severity: wishlist

Hi,

please consider this new pidof_apache function for the init.d script:

pidof_apache() {
    # if there is actually an apache2 process whose pid is in PIDFILE,
    # print it and return 0.
    if [ -e "$PIDFILE" ]; then
      if pidof apache2 | tr ' ' '\n' | grep $(cat $PIDFILE); then
        return 0
      else
        return 1
      fi
    fi
    return 1
}

This has the advantage of not explicitly iterating through all existing
apache2 processes, which makes -x output much easier readable. I am
sure that the if construct can be written more elegantly though.

Greetings
Marc



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to