Advertisement
MertcanGokgoz

cups_fix

Dec 30th, 2018
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # Author Mertcan GOKGOZ - 2016
  4. # Bir sistemdeki tüm yazicilar icin cupsenable komutunun calıstirilmasi
  5.  
  6. set -e
  7.  
  8. YAZICILAR=`lpstat -p | grep printer | grep -v enable | awk '{print $2}' | sed '/^$/d'`
  9. if [ "x$YAZICILAR" !=  "x" ]; then
  10.   for yaziciadi in $YAZICILAR; do
  11.     echo "Lutfen Bekleyin $yaziciadi Yazici Etkinlestiriliyor"
  12.     cupsenable -h 127.0.0.1:631 $yaziciadi && logger "$yaziciadi Yazici Etkinlestirildi"
  13.   done
  14. fi
  15. sleep 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement