Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 May 2020 06:56:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 246623] www/caddy: Update to 2.0.0
Message-ID:  <bug-246623-7788-OzLrBu8raG@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-246623-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-246623-7788@https.bugs.freebsd.org/bugzilla/>

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

--- Comment #4 from Basil Hendroff <basil.hendroff@gmail.com> ---
(In reply to Daniel Tihanyi from comment #0)

Hi Daniel,

For my own understanding, how important is it that Caddy V2 create a PID fi=
le,
or require LOGIN and DAEMON? I haven't found these to be showstoppers in
getting Caddy V2 working in the rc.d framework. This thread also seems to
suggest that a PID file in not entirely necessary
https://forums.freebsd.org/threads/rc-d-script-to-start-a-sh-script.63178/=
=20

I've also independently worked on an rc script. Details can be found at
https://github.com/basilhendroff/freenas-iocage-caddyv2. What's reassuring =
is
that we have got to similar points quite independently.=20

A couple of comments on your rc script.

1. I do like elements of what you've done especially around command_args and
command flags.

command_args=3D"${caddy_flags} -config ${caddy_config}"

I wonder if the order should be switched though, or whether it matters? i.e=
.=20

command_args=3D"--config ${caddy_config} ${caddy_flags}"

Why? For instance, it may facilitate implementing a 'quiet mode'. As you wi=
ll
be aware, the Caddy start and reload commands generate quite a lot of outpu=
t.
In its simplest form, this can be prevented by setting caddy_flags=3D"> /de=
v/null
2>&1" in /etc/rc.conf.

2. The script I came up with is very similar to yours, but deviates slightl=
y in
a couple of places. You might like to consider these deviations.

2.1 Kudos on the start, validate and reloads methods. However, it's not exa=
ctly
clear to me why you've implemented a separate stop method. The built-in met=
hod
appears to work well.

2.2 The location of the Caddyfile and Caddy executable, I've set up as
configurable script parameters caddy_config_path and cadd_bin_path. For
instance, I think in the V1 rc script, the default Caddyfile location was
/usr/local/www/Caddyfile. This may be important for some users migrating fr=
om
V1 to V2.

Thank you for offering to maintain the port. This was raised as recently as=
 a
few hours ago by the Caddy dev in this Caddy forum post
https://caddy.community/t/caddy-version-1-end-of-life-date/7835/26

--=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-246623-7788-OzLrBu8raG>