Logüberwachungsskript
# Scriptname: auto_printer_state.sh
# Intention: monitor the syslog file for the connect/disconnect messages of a usb-printer
# and start/stop the printer in cups after finding such a message
#
# Since newer Cups versions do this automatically this is only useful for
# use with old Cups versions, e.g. under SuSE 9.0
# For this purpose the 'cups' init script from SuSE 9.0 was modified for also starting and
# stopping this script together with Cups under SuSE 9.0 and is provided together with it.
#
# Besides it's original application this script can of course be used to watch for some
# other message apearing in some other log and connecting that message with an action.