source: gutenbach/debian/inst/cups-set-perms @ c503858

debianmacno-cupsnodebathenaweb
Last change on this file since c503858 was c503858, checked in by Yuri Lin <yuri@…>, 15 years ago

New scripts to add printer and set permissions using CUPS; change the post-installation script to use these new scripts.

  • Property mode set to 100755
File size: 445 bytes
Line 
1#!/bin/sh
2
3# Set the CUPS permissions such that anyone can add/remove jobs
4# from the queue for gutenbach.
5
6if [ -e /usr/lib/gutenbach/config/printername ]; then
7    printername="$(cat /usr/lib/gutenbach/config/printername)"
8
9    cat >> /etc/cups/cupsd.conf <<EOF
10<Location /printers/$printername>
11    Order Deny, Allow
12    Allow from All
13</Location>
14EOF
15
16else
17    echo "Error: /usr/lib/gutenbach/config/printername does not exist"
18    exit 1
19fi
Note: See TracBrowser for help on using the repository browser.