Conjuror is a project mainly written in Ruby, it's free.
A daemonizer with plans to become something more
= conjuror
In a nutshell, conjuror is an external daemonizer. Its main purpose is to detach from terminal (thus becoming a daemon), then set environment for a child, and then replace its own process with the one of a child (man 3 exec).
== Operation
First conjuror gathers the required information:
Once all the definitions are gathered the following steps are performed:
== Incantations
An incantation is an instruction for conjuror what process to execute and what environment for it to set. It consists of lines (delimited with , as in plain textfile), each containing a single definition. The order of everything is not important and everything is case-insensitive, unless stated otherwise.
Please read the following carefully, it shall give you an insight on the parsing procedure.
Every word that starts with / (a forward slash) shall be either a program or a pidfile. If the file exists and is executable, it is considered a program, otherwise it is a pidfile. Either of them may only be defined once. By the way, the program is the only mandatory definition, the rest are all optional. Both filenames are case-sensitive.
== Examples
conjuror -u ntpd -g ntpd -e "USER=ntpd" -e "FOO=123 123" -- ntpd -S
In the name of nogroup, the mighty creatures who dwell inside the Earth In the name of nobody, the colossal master of the Skies The heritage at /var/run/riverine/spooler.pid awaits your return untouched With your flaming sword shall you defend the weak With your black shield shall you defeat the enemies Arise, oh /usr/local/bin/riverinespoold! Arise, oh ghostly shadow of a dead knight!
name ntpd name ntpd USER=ntpd /var/run/openntpd.pid /usr/sbin/ntpd -d -s -f /etc/openntpd/ntpd.conf
== Copyright
This software is public domain.
Developed by [email protected] in 2010.