Recover from errors automatically
Steven Sweet
steve at easysw.com
Tue May 10 13:39:21 PDT 2005
> Since a few weeks I'm using CUPS to manage a couple of printers. One of them,
> HP 2300, gives an error once per week or so, which makes CUPS stop the cue
> and I have to manually restart it.
>
> Usually the problem is solved by restarting the printer which is something
> that the end user can do himself but it won't work until CUPS is told to
> restart.
>
> Is there a way to tell CUPS to retry every few minutes if there is an error?
No, but you can set up a cron job and have it check periodically on status and restart if neccessary.
Use this:
#!/bin/sh
for printer in `lpstat -p | grep 'disabled since' | awk '{print $2}'`; do
enable $printer
done
More information about the cups
mailing list