Skip to content

Healthcheck returns exit code 1 when passing all tests #10337

Description

@tziuhtli

Prerequisites

  • I have searched for duplicate or closed issues
  • I can recreate the issue with all plugins disabled

Describe the issue

I'm running a test environment using docker. Just noticed the exit codes are returning incorrect values.

Recreate this by running

php /var/www/html/bin/healthcheck.sh ; echo $?

This is my output on a vanilla container, nothing is configured.

DB: OK
IMAP: OK (localhost:143)
SMTP: NOT OK (Failed to connect to localhost:587)
0

Setting up smtp and imap, you get the following.

DB: OK
IMAP: OK (REDACTED)
SMTP: OK (REDACTED)
1

Note the exit codes are backwards, it should exit 0 when everything is ok and 1 when there are errors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions