Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Apr 2024 09:16:02 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 278325] www/oauth2-proxy enhancement: rc-script instancing of multiple oauth2-proxies on the same system
Message-ID:  <bug-278325-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D278325

            Bug ID: 278325
           Summary: www/oauth2-proxy enhancement: rc-script instancing of
                    multiple oauth2-proxies on the same system
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: netchild@FreeBSD.org
                CC: freebsd@rheinwolf.de
             Flags: maintainer-feedback?(freebsd@rheinwolf.de)
                CC: freebsd@rheinwolf.de

Created attachment 249926
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D249926&action=
=3Dedit
new rc script

Hi,

the attached rc script is a modification of the existing one:
 - use instancing to be able to create new instances of the script via links
(done like in the tomcat ports, or the openhab port)
 - rename (hyphen to underscore, see below)

What this allows to do:
 - ln -s oauth2_proxy /usr/local/etc/rc.d/oauth2_proxy_sitename
 - cp -p /usr/local/etc/oauth2-proxy.cfg
/usr/localetc/oauth2-proxy-sitename.cfg
 - edit oauth2-proxy-sitename.cfg (not only other port)
 - sysrc oauth2_proxy_sitename_enable=3DYES
 - service oauth2_proxy_sitename start

Changes:
 - change the name of start script (the config name is derived from the scr=
ipt
name by replacing underscores with hyphens)
 - the logfiles (each one different based upon the rc.d name) will have an
underscore in the name of the logfile
 - daemon will write child-pid files, which are used in the rc script to use
them to only kill the child which belongs to it on stop
 - pidfiles are derived from rc.d name
 - rc.conf variable names are derived from the rc.d name

This way you can either use the original config if you need only one oauth2
proxy, or you can host multiple oauth2-proxy instances to different backend
sites on one system and manage them independently.

This also requires to change the Makefile of the port to adapt to the new n=
ame
of the rc script (and an updating entry about it).

If you agree to this enhancement, I can writeup an UPDATING entry and commit
the change.

Bye,
Alexander.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-278325-7788>