Bug 264062

Summary: net/rabbitmq rc script exits non-zero
Product: Ports & Packages Reporter: FiLiS <freebsdbugs>
Component: Individual Port(s)Assignee: Jimmy Olgeni <olgeni>
Status: Closed FIXED    
Severity: Affects Many People CC: olgeni
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description FiLiS 2022-05-18 08:35:48 UTC
when running /usr/local/etc/rc.d/rabbitmq start or /usr/local/etc/rc.d/rabbitmq stop, the exit code seems to be 1, even though everything was stopped successfully. 
This probably causes problems with a lot of things relying on the service script's exit code.
I don't know what causes this, since there is no explicit exit code in the the shell script itself.
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-02-18 08:12:10 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f39b219f5749d7b2dc3f46bfda9de37e9b5f1625

commit f39b219f5749d7b2dc3f46bfda9de37e9b5f1625
Author:     Jimmy Olgeni <olgeni@FreeBSD.org>
AuthorDate: 2023-02-17 19:40:18 +0000
Commit:     Jimmy Olgeni <olgeni@FreeBSD.org>
CommitDate: 2023-02-18 08:10:45 +0000

    net/rabbitmq: rc.d improvements

    This commit creates a separate directory at /var/run/rabbitmq to
    host the RabbitMQ pid file. Previously, the pid file was not being
    created properly (it was empty) and this was causing issues with
    the process of waiting for pids (as the pid file existed, but had
    no value and was considered "garbage"). With this change the pid
    file is created with the correct value, enabling the process of
    waiting for pids to complete successfully; now the startup script
    returns exit code 0.

    Additionally, this commit exports the variables RABBITMQ_HOME,
    RABBITMQ_LOG_BASE, and RABBITMQ_PID_FILE so that the RabbitMQ process
    can properly locate the pid file.

    These changes resolve PR 264062.

    PR:             264062
    Reported by:    FiLiS <freebsdbugs@filis.org>

 net/rabbitmq/files/rabbitmq.in | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
Comment 2 Jimmy Olgeni freebsd_committer freebsd_triage 2023-02-18 08:14:16 UTC
Should be good to go \o/