printer_server QUEUE-DIRECTORY Act as a server for printer_client: see that program for user documentation. This program is intended to be invoked from an .ssh/authorized_keys file line of the form: command="printer_server QUEUE-DIRECTORY" ... The QUEUE-DIRECTORY name must be absolute. The QUEUE-DIRECTORY holds files to be printed. When it is being written, such a file has the .out extension. When it is ready for printing, the extension name is changed to .ps. When it has been printed, the extension name is changed to .done. The printer_server reads commands from its standard input and executes them. In these commands FILE refers to a file name that cannot contain a slash (/) or begin with a dot (.). The commands are: get FILE Return the QUEUE-DIRECTORY/FILE file in the standard output. sum FILE Return the MD5 sum of QUEUE-DIRECTORY/FILE file in the standard output. done FILE Change the extension of QUEUE-DIRECTORY/FILE to .done. The file must previously have had extension .ps or .done. ready FILE Ditto but change the extension to .ps instead of to .done. remove FILE Remove QUEUE-DIRECTORY/FILE. File must have extension .out, .ps, or .done. listfiles List all the files in the QUEUE-DIRECTORY, one line per file name, in lexical order. listdir List QUEUE-DIRECTORY as per `ls -ltr'. Error messages are treated as standard output After producing any required output, each of these commands outputs a line containing just: %%-HPCM_DONE-%% Any errors terminate the command and output: %%-HPCM_ERROR-%% error messages %%-HPCM_DONE-%% It is assumed %%-HPCM_XXX-%% lines never appear in a postscript file or as a file name.