Cups

Beállítások biztonsági mentése

launchctl unload /System/Library/LaunchDaemons/org.cups.cupsd.plist tar cvzf cups-backup.tar.gz /etc/cups launchctl load /System/Library/LaunchDaemons/org.cups.cupsd.plist

Szünetelő nyomtatók automatikus engedélyezése

http://www.splinter.com.au/using-launchd-to-run-a-script-every-5-mins-on/

Hozzuk létre a nyomtató helyreállító /opt/tia/tia-enable-printers scriptet:

#!/bin/bash -e PATH=/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin lpstat -p | grep -i disabled | sed -E 's>^printer ([^ ]+) .*>\1>' | while read printer do cupsaccept "${printer}" cupsenable "${printer}" done exit 0

Hozzuk létre az /opt/tia/tia.enable-printers.plist ütemezett feladatot:

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>tia.enable-printers</string> <key>ProgramArguments</key> <array> <string>/opt/tia/tia-enable-printers</string> </array> <key>StartInterval</key> <integer>15</integer> </dict> </plist>

Mozgassuk a helyére:

mv '/opt/tia/tia.enable-printers.plist' '/Library/LaunchDaemons/'

Töltsük be az ütemezett feladatot:

launchctl load -w '/Library/LaunchDaemons/tia.enable-printers.plist'

Bug

https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161/comments/28