debianmacno-cupsnodebathenaweb
Last change
on this file since 8045b0a was
8045b0a,
checked in by Jessica B. Hamrick <jhamrick@…>, 14 years ago
|
Updated permissions to allow everybody to access the server
|
-
Property mode set to
100755
|
File size:
717 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | echo "Reverting changes to /etc/cups/cupsd.conf..." >&2 |
---|
4 | conffile="/etc/cups/cupsd.conf" |
---|
5 | |
---|
6 | mv "$conffile" "$conffile.bak" |
---|
7 | touch "$conffile" |
---|
8 | sed '/# Begin configurations for gutenbach/,/# End configurations for gutenbach/ d' < "$conffile.bak" > "$conffile" |
---|
9 | |
---|
10 | mv "$conffile" "$conffile.bak" |
---|
11 | touch "$conffile" |
---|
12 | while 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 | root_location=$(echo "$line" | grep '^Allow from All # added by Gutenbach$' || true) |
---|
18 | if [ -z "$root_location" ]; then |
---|
19 | echo "$line" >> "$conffile" |
---|
20 | fi |
---|
21 | fi |
---|
22 | |
---|
23 | done < "$conffile.bak" |
---|
24 | |
---|
25 | rm "$conffile.bak" |
---|
Note: See
TracBrowser
for help on using the repository browser.