The 'qotd' service gives you a random 'Quote of the Day' from a data
file 'quotes' that uses a simple text format. The 'quotes' file format
separates individual quotes by a '%' on a line by itself. A final line
containing a '%' marks the end of the file, though it is not required.
Typically, the quotes file will look as follows:
"I only regret that I have but one life to give for my country."
"There is nothing to fear but fear itself."
Franklin D. Roosevelt
"Great Spirits Have Always Encountered Violent Opposition From
You may add your own quotes at any point in the file provided that you
maintain the same file format. Carriage returns
B]# is the optional quote number (beginning with zero) to display a specific quote
B]-d instructs quoted to run as a daemon (do not use with inetd)
B]-D instructs quoted to simulate running as a daemon, but run from the console,
for debugging purposes.
B]-p:port instructs quoted to listen on a specific port th TCP and UDP. This
is only valid when either -d or -D is specified. The default port is 17 td.
In 'inetd.conf' you can add the following lines to invoke quoted via inetd:
qotd stream tcp nowait nobody /usr/local/bin/quoted
qotd dgram udp wait nobody /usr/local/bin/quoted