Prerequisites
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.
Prerequisites
Describe the issue
I'm running a test environment using docker. Just noticed the exit codes are returning incorrect values.
Recreate this by running
This is my output on a vanilla container, nothing is configured.
Setting up smtp and imap, you get the following.
Note the exit codes are backwards, it should exit 0 when everything is ok and 1 when there are errors.