source: debian/rm/cups-revert-perms @ 4ac44b2

debianmacno-cupsnodebathenaweb
Last change on this file since 4ac44b2 was 4ac44b2, checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago
  • More useful things in the README
  • Change perms to listen from everywhere
  • Conflict with pulseaudio, recommend removing bluez-alsa
  • Property mode set to 100755
File size: 588 bytes
Line 
1#!/bin/sh
2
3echo "Reverting changes to /etc/cups/cupsd.conf..." >&2
4conffile="/etc/cups/cupsd.conf"
5
6mv "$conffile" "$conffile.bak"
7touch "$conffile"
8sed '/# Begin configurations for gutenbach/,/# End configurations for gutenbach/ d' < "$conffile.bak" > "$conffile"
9
10mv "$conffile" "$conffile.bak"
11touch "$conffile"
12while read line; do
13    listen_localhost=$(echo "$line" | grep '^#GUTENBACH' || true)
14    if [ -n "$listen_localhost" ]; then
15        echo "$(echo $line | sed s/#GUTENBACH//)" >> "$conffile"
16    else
17        echo "$line" >> "$conffile"
18    fi
19done < "$conffile.bak"
20
21rm "$conffile.bak"
Note: See TracBrowser for help on using the repository browser.