Automatic Printer Restart?
Franz Pfoertsch
franz.pfoertsch at brose.net
Tue May 9 06:46:48 PDT 2006
a small cronjob for printer restart:
-8<------------
#!/bin/bash
##############################################################################
# /usr/local/sbin/start_printers.sh
# Beschreibung: Da die Drucker bei korrodin unter Cups zwar Auftr�e
# anstandslos annehmen, diese aber erst drucken, wenn
# die Drucker "enabled" werden, dieses Skript als Workarround:
# Es enables mintlich die vorhanden Drucker. Unsch�, aber
# wenn's hilft...
##############################################################################
PRINTERS=$(lpstat -t | grep disable | /usr/bin/cut -d" " -f2)
for PRINTER in $PRINTERS
do
/usr/bin/enable $PRINTER
done
-8<----------
The crontab entrie:
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
3 * * * * /usr/cust/bin/start_printer >/dev/null 2>&1
I_one wrote:
> Can i see this script for automatic restart my LPD printers ... i have the
> same problems ... ?
>
> <angelb at bugarin.us> ÓÏÏÂÝÉÌ/ÓÏÏÂÝÉÌÁ × ÎÏ×ÏÓÔÑÈ
> ÓÌÅÄÕÀÝÅÅ: news:24847-cups.general at news.easysw.com...
>> You could setup a cron process that checks for disabled printers
>> every 10 minutes and enables it if found. That's what I did for
>> our servers.
>>
>> At the moment, I don't think there's any setting in CUPS that
>> allows for automating this process. CUPS wouldn't know when a
>> printer has become online or available.
>>
>>> I have a CUPS server with about 20 printers running on it through the
>>> CUPS-LPD service. One thing that I've noticed is that if a printer gets
>>> unplugged from the network then printer goes to a "Stopped" state. This
>>> means that I have to go into the server and turn it back on.
>>>
>>> Does anyone know if there is a way which you can make CUPS automatically
>>> start the printer once it has re-established its connection on the
>>> network?
>>
More information about the cups
mailing list