**Platform:** Redhat Linux 9 **
Language:** Perl **
Other:** Use DBD DBI to connect to DB
Daemon waits for a connection on a port defined in a variable at the top of the script. It will spawn another process to handle the incoming connection and continue to listen. The child process will take first line as *cluster-agent* from the client. It will then wait for string "READY" from the client.
Then it will insert new record in script table in a database defined in a variable at the top of the script.
Field "sent" will contain the current datetime.
Field "cluster" will contain the cluster sent from the client.
Field "agent" will contain the agent sent from the client.
See attached zip file for database structure.
It will then get the id of the record just inserted in table script placing it in a var $scriptid. Then it does an update sql statement on all records in the cmds table with null scriptid field, type field equaling "OUTPUT", matching agent field to agent sent from client and matching cluster field to cluster sent from client. Updateing the scriptid field to $scriptid. Then select all records that have that $scriptid. It then sends the string "OUTPUT" to the client. Next it sends a variable $prepend which will equal "prependtxt". Then sending all of the records selected. Lastly sending a variable called $suffix which equals "suffixtxt".
2) Complete ownership and distribution copyrights to all work purchased.
**Platform:** Redhat Linux 9