[Bug 243860] www/gitlab-ce rc.d script does not support rcvar subcommand

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Feb 4 03:54:49 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243860

            Bug ID: 243860
           Summary: www/gitlab-ce rc.d script does not support rcvar
                    subcommand
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: mfechner at FreeBSD.org
          Reporter: amendlik at gmail.com
          Assignee: mfechner at FreeBSD.org
             Flags: maintainer-feedback?(mfechner at FreeBSD.org)

The rc.d script that ships with www/gitlab-ce does not support the rcvar
subcommand, as in: 

# service gitlab rcvar

This causes a problem for configuration management tools (Chef, Puppet, Salt,
Ansible, etc.) because they depend on the rcvar subcommand to be present to
determine the variable name when enabling/disabling services.

I believe the entire input handling section of the rc.d script can be replaced
with a call to 'run_rc_command'. It provides support for start, stop, restart,
status, rcvar, and more.

     ### Finally the input handling.
    -
    -case $gitlab_enable in
    -  [yY][eE][sS])
    -    case "$1" in
    -      start|quietstart|faststart)
    -        start_gitlab
    -        ;;
    -      stop|faststop)
    -        stop_gitlab
    -        ;;
    -      restart)
    -        restart_gitlab
    -        ;;
    -      reload|force-reload)
    -     reload_gitlab
    -        ;;
    -      status)
    -        print_status
    -        exit $gitlab_status
    -        ;;
    -      *)
    -        echo "Usage: service gitlab
{start|quietstart|faststop|stop|restart|reload|onestart|onestop|onerestart|onreload|status}"
    -        exit 1
    -        ;;
    -    esac
    -    ;;
    -  *)
    -    case "$1" in
    -      onestart)
    -        start_gitlab
    -        ;;
    -      onestop)
    -        stop_gitlab
    -        ;;
    -      onerestart)
    -        restart_gitlab
    -        ;;
    -      onreload)
    -        reload_gitlab
    -        ;;
    -      status)
    -        print_status
    -        exit $gitlab_status
    -        ;;
    -      *)
    -        echo "Usage: service gitlab
{start|quietstart|faststop|stop|restart|reload|onestart|onestop|onerestart|onreload|status}"
    -        exit 1
    -        ;;
    -    esac
    -esac
    +run_rc_command "$1"

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list