1

we have a printer in our office and want to print out files which have been uploaded to the server via rsync.

Using incron with the following does not seem to work when uploaded from rsync:

/var/ordersFolder/orders IN_CLOSE_WRITE lp $@/$#

If I write a file to this folder normally with vim, this works and prints.

The rsync command I'm running on a crontab is the following:

rsync -t --ignore-existing root@externalserver.co.uk:/var/otherServer/orders/* /var/ordersFolder/orders/

Is there a way to properly do this? Thank you.

Alex
  • 13
  • 3
  • if you run `lp` on one of the files in `/var/ordersFolder/orders` manually does it print properly? Also, since you're using `--ignore-existing` wouldn't be wiser to use the `IN_CREATE` inode event instead of `IN_CLOSE_WRITE`. One more thing, inode watching will not recurse into directories, everything in `/var/ordersFolder/orders` must be composed of regular files. – grochmal Jun 09 '16 at 17:01

0 Answers0