NAME

configd - Adopt a config file that has no conf.d, and keep it generated.

VERSION

version 0.002

SYNOPSIS

configd languages
configd adopt   postfix
configd status  postfix
configd build   postfix
configd release postfix

DESCRIPTION

Postfix, and plenty like it, keeps its configuration in one file with no conf.d to add to. Two things configuring the same server therefore cannot both win.

configd adopt puts a fragment directory beside each such file, moves what is there now into it as 00-original, and installs a systemd drop-in that regenerates the file every time the service starts or reloads. After that, configuring the service means writing a file into the fragment directory, which any number of things can do without treading on each other.

COMMANDS

languages

What this installation knows how to adopt.

adopt LANGUAGE

Take the language's files over and wrap its service. Reloads systemd and restarts the service unless --no-restart says not to.

Running it twice is safe.

build LANGUAGE

Regenerate the files from their fragments. This is what the drop-in runs; you would run it by hand to see what a fragment does without restarting anything.

status LANGUAGE

Whether the files are adopted, how many fragments each has, and whether the service is wrapped.

release LANGUAGE

Put the original files back and remove the drop-in. The fragment directories are left alone, so adopting again picks up where this left off.

OPTIONS

--root DIR

Work under DIR rather than /. For building an image, or for looking at what would happen without touching the running system.

--configd PATH

The path to this program as the generated unit should invoke it. Defaults to /usr/bin/configd; systemd will not take a relative one.

--no-restart

Do not reload systemd or restart the service. Implied by --root, since the files being configured are not the ones this machine is running on.

--quiet

Say nothing unless something is wrong.

EXIT STATUS

Zero on success. status exits non-zero when the service is not wrapped, so it can be tested. Two for a usage error, one for anything else.

SEE ALSO

Please see those modules/websites for more information related to this module.

BUGS

Please report any bugs or feature requests on the bugtracker website https://github.com/teodesian/perl-configd/issues

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

AUTHORS

Current Maintainers:

  • George S. Baugh <george@troglodyne.net>

COPYRIGHT AND LICENSE

Copyright (c) 2026 Troglodyne LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.