1752322 Members
5740 Online
108786 Solutions
New Discussion юеВ

Re: turn off jobmonitor

 
SOLVED
Go to solution
Maurice Peterse
Frequent Advisor

turn off jobmonitor

Hello,

After installation of a newer version of jetadmin, it seems that all our printers have a changed setting as to jobmonitor. it's turned ON now, and i want it turned OFF for all printers.

How can i best do this?
I have a directory with all printers in it and i'd love to use a script to change the setting for all printers at once.

Thanx in advance
maurice
8 REPLIES 8
Dave Kelly_1
Respected Contributor

Re: turn off jobmonitor

Sorry, no script but the information is help in /etc/interface/.

You should make sure that jobm="no"
Maurice Peterse
Frequent Advisor

Re: turn off jobmonitor

no directory /etc/interface present
Dave Kelly_1
Respected Contributor

Re: turn off jobmonitor

My apologies, my brain works faster that I can type.

The directory is /etc/lp/interface.
Maurice Peterse
Frequent Advisor

Re: turn off jobmonitor

thanx, good info

now all i need is a little script that replaces all the jobm="yes" with "no"

any magical ideas?

;o)
maurice
Dave Kelly_1
Respected Contributor

Re: turn off jobmonitor

Try this. It will leave a .old file as a backup.

#!/bin/ksh

for f in /etc/lp/interface/*
do
if [ ! -d $f ]
then
cat $f | sed 's/jobm="yes"/jobm="old"/g' > $f.new
mv $f $f.old
mv $f.new $f
chmod 755 $f
chown lp:bin $f
fi
done

exit 0
Dave Kelly_1
Respected Contributor
Solution

Re: turn off jobmonitor

Doh! Another typo. Use this script:


#!/bin/ksh

for f in /etc/lp/interface/*
do
if [ ! -d $f ]
then
cat $f | sed 's/jobm="yes"/jobm="no"/g' > $f.new
mv $f $f.old
mv $f.new $f
chmod 755 $f
chown lp:bin $f
fi
done

exit 0
Maurice Peterse
Frequent Advisor

Re: turn off jobmonitor

then is not recognized
:/

scripting isn't my "thing" sorry
Rainer_1
Honored Contributor

Re: turn off jobmonitor

create the file /tmp/jobmon.sh:

#!/sbin/sh
cd /etc/lp/interface
for file in `grep -l '^jobm="yes"' *`
do
ed $file </^jobm="yes"
. s/yes/no/
1
/^userjobm="yes"
. s/yes/no/
w
q
EOF
done

Then execute:

sh /tmp/jobmon.sh