Stop checking for get_pidfile_from_conf function in rc.subr.
It is present in all supported versions of FreeBSD, and has had poor takeup.
I strongly suspect the strange-looking checks are partially to blame for
scaring maintainers off.
Go forth and please use it!
PR: ports/178269
Approved by: maintainers of all ports involved
Fix the currently-broken rc.d script:
1. Tidy up the header
2. nrpe2 runs as an unpriviliged user, so REQUIRE: LOGIN is manadatory
3. Move load_rc_config up higher
4. Since _enable and _configfile are mandatory they should use :=
5. Only sets command_args once, and puts -d last as is traditional.
6. Pulls the pidfile from nrpe.cfg, which means it only has to be set once.
Improve rc script handling of pidfile, and do a few optimisations
PR: ports/168225
Submitted by: yar (based on)
While here, copy over default config file on install
In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().
In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
Fix a few "bad example" problems in the rc.d scripts that have been
propogated by copy and paste.
1. Primarily the "empty variable" default assignment, which is mostly
${name}_flags="", but fix a few others as well.
2. Where they are not already documented, add the existence of the _flags
(or other deleted empties) option to the comments, and in some cases add
comments from scratch.
3. Replace things that look like:
prefix=%%PREFIX%%
command=${prefix}/sbin/foo
to just use %%PREFIX%%. In many cases the $prefix variable is only used
once, and in some cases it is not used at all.
4. In a few cases remove ${name}_flags from command_args
5. Remove a long-stale comment about putting the port's rc.d script in
/etc/rc.d (which is no longer necessary).
No PORTREVISION bumps because all of these changes are noops.
- Modify rc.d script to allow administrator to change PID file location
without editing rc.d script. New knob nrpe2_pidfile is provided for
this and it defaults to the old value of the PID file.
- Bump PORTREVISION
PR: 129386
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by: maintainer
- Update to 2.12
Included in this PR is reload support requested by ports/126476 in addition to a
change in the location of the PID file. I have however opted to move this file
to
NAGIOSDIR to reduce the number of directories created by all Nagios related
ports.
PR: 128409
Submitted by: Jarrod Sayers <jarrod@netleader.com.au> (maintainer)