summaryrefslogtreecommitdiff
path: root/samba/smb-printers-lprng.conf
blob: 12fc54c1fc0468631e4c00bf417da5ba6de3eba1 (plain)
  1. control:
  2.     AddInstallable = ( samba samba_reload )
  3. #
  4. # Variables for the print spooldir
  5. # You can change the rights on the dir in the "directories:"
  6. # section.
  7. #
  8. printdir = ( /var/spool/lpd/sharedprinter )
  9. editfiles:
  10. samba::
  11. { /etc/samba/smb-printers.conf
  12. AutoCreate
  13. #
  14. # [netlogon]
  15. #
  16. BeginGroupIfNoLineMatching "^\[printers\]"
  17. Append '[printers]'
  18. Append ' comment = %S printer'
  19. Append ' path = /tmp'
  20. Append ' printing = lprng'
  21. Append ' print command = /usr/bin/lpr -h -P%S -r %s'
  22. Append ' lprm command = /usr/bin/lprm -P%S %j'
  23. Append ' public = yes'
  24. Append ' printable = yes'
  25. EndGroup
  26. DefineClasses "samba_reload"
  27. }
  28. samba_reload::
  29. { /etc/samba/smb-printers.conf
  30. LocateLineMatching "^; EDITED BY CFENGINE .*"
  31. ReplaceAll '; EDITED BY CFENGINE .*$' With '; EDITED BY CFENGINE $(date)'
  32. CatchAbort
  33. BeginGroupIfNoMatch "^; EDITED BY CFENGINE .*"
  34. Append '; EDITED BY CFENGINE $(date)'
  35. EndGroup
  36. }
  37. directories:
  38. samba::
  39. $(printdir)
  40. mode=770
  41. owner=root
  42. group=users
  43. processes:
  44. "smbd" restart "/etc/init.d/samba restart"
  45. shellcommands:
  46. samba_reload::
  47. "/etc/init.d/samba force-reload"