DUENDE(8)
π DUENDE π
okay so bestie, welcome to duende(8) β the manual page for the duende command. she's an 8, which means sysadmin territory, so grab your boba and let's get into it π§β¨
β¨ NAME β¨
duende β run a child process as a daemon π
πΈ DESCRIPTION πΈ
duende makes a given child process a daemon. no cap. and the standard output and standard error of the child process is logged via syslog() with a priority of LOG_ALERT. so like, everything your baby process says? it's going in the logs, at maximum drama priority. alert level bestie. π¨
π USAGE π
duende [options] child_process [ arguments passed onto child ]
that's it. that's the vibe. β¨
π¦ DETAILS π¦
so the way that this works is lowkey iconic. when duende is invoked, it spawns two processes. one is the daemonized child process (the star of the show, main character energy π), and the other one is a process that reads and logs the standard output of that daemonized process. the parent process stays alive the whole time so it can monitor the daemonized process like a very attentive bestie. π«Ά
duende requires a blank directory named /etc/maradns/logger to run. not optional. she needs her room clean. π§Ή
signal tea β:
- Should the parent
duendeprocess get aHUPsignal,duendewill restart the child process. - Should the daemonized or logging process receive an untrapped
HUPsignal or exit with an exit code of8,duendewill restart the process. - Should the daemonized or logging process exit for any other reason,
duendewill send the logger process aTERMsignal and exit. - Should the
duendeparent process receive aTERMorINTsignal,duendesends all of its childrenTERMsignals, then exits.
β οΈ okay important one: theduendeprocess must be started as the superuser. this is because Duende's intended child processes (maradnsandzoneserver) need to bind to privileged ports, and becauseduendeuses asetuid()call to change the user ID of the logging process to the user with ID66. so like, root or nothing, fr fr. π
π OPTIONS π
most of the above behaviour can be configured by command line arguments. obsessed. let's go one by one:
-c|--chroot directoryβ the log helper process will change its directory and root to this location. this defaults to/etc/maradns/logger.-i|--ident stringβ the log helper process will use this string to identify the process when sending messages to syslog. this defaults tolog-help.-p|--pid filenameβ if this argument is present, theduendeparent process will store its pid in this file.-u|--uid integerβ the log helper process will drop its user id to this. this value defaults to66.-g|--gid integerβ the log helper process will drop its group id to this. this value defaults to66.-r|--restart_on integerβ the log helper process will restart the child process if it exists with this status code. this defaults to8.
π LOGGING π
duende uses the syslog() facility to log the standard output of the program that it invokes. the name of the program β in other words, the "ident" given to openlog() β defaults to log-helper but can be overridden with the --ident argument. β¨
all messages created by the child process are sent to syslog() with a priority of LOG_ALERT and a "facility" of LOG_DAEMON (daemon.info in /etc/syslog.conf). should duende itself encounter an error, it will send messages to syslog() with a priority of LOG_ALERT. so yeah, everyone's screaming at alert level in here. iconic honestly. π₯
also, the directory /etc/maradns/logger, while used by duende, is not used to store any log messages. that is unless, for some reason, one configures syslog to store messages there. so like, don't @ her about it. π
β EXAMPLES β
using duende to start maradns, where the mararc file is /etc/mararc.2:
duende maradns -f /etc/mararc.2
using duende to start zoneserver, where the mararc file is /etc/mararc.4:
duende zoneserver -f /etc/mararc.4
ate. no crumbs. π
π BUGS π
Duende assumes that all of its children are well-behaved, eating their vegetables, going to bed when told, and terminating when receiving a TERM signal. π₯¦ποΈ
bestie if your child process is feral, that's a you problem. not me. π
π₯ SEE ALSO π₯
π LEGAL DISCLAIMER π
okay so this is the part where the lawyers come out. deep breath. π¬οΈ
THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
so basically: use at your own risk, she is not liable, periodt. π
π AUTHOR π
Duende and this man page are written by Sam Trenholme. D Richard Felker III provided some invaluable assistance with the piping code which duende uses. shoutout to the besties. π«Άβ¨
and that's the whole page, bestie! this one's from January 2003, and the source is the duende manual β DUENDE(8). go daemonize something responsibly, mwah ππΈπ¦
π¦ where this page comes from
- ubuntu jammy: duende 2.0.13-1.4+deb11u1build0.22.04.1 Β· BSD-2-Clause
- ubuntu jammy: duende 2.0.13-1.4build2 Β· BSD-2-Clause
- ubuntu noble: duende 2.0.13-1.6 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms