Index menü
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
/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
/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>
mv '/opt/tia/tia.enable-printers.plist' '/Library/LaunchDaemons/'
launchctl load -w '/Library/LaunchDaemons/tia.enable-printers.plist'