aboutsummaryrefslogtreecommitdiff
path: root/network/privoxy/doinst.sh
diff options
context:
space:
mode:
authorKyle Guinn <elyk03@gmail.com>2011-12-10 09:12:35 -0200
committerNiels Horn <niels.horn@slackbuilds.org>2011-12-10 09:12:35 -0200
commit7c7ac7975b888ea1976c30850161b41247b06e9e (patch)
tree94f242645ae9ea3189fc3d9dc03a3fff8f4598a3 /network/privoxy/doinst.sh
parent4c007e25781769b4095826a7ec5cecd17179b6b4 (diff)
network/privoxy: Updated for version 3.0.18.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'network/privoxy/doinst.sh')
-rw-r--r--network/privoxy/doinst.sh61
1 files changed, 14 insertions, 47 deletions
diff --git a/network/privoxy/doinst.sh b/network/privoxy/doinst.sh
index 71fb8f31d2ee0..69368538fbf30 100644
--- a/network/privoxy/doinst.sh
+++ b/network/privoxy/doinst.sh
@@ -10,15 +10,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.privoxy.new:
-if [ -e etc/rc.d/rc.privoxy ]; then
- cp -a etc/rc.d/rc.privoxy etc/rc.d/rc.privoxy.new.incoming
- cat etc/rc.d/rc.privoxy.new > etc/rc.d/rc.privoxy.new.incoming
- mv etc/rc.d/rc.privoxy.new.incoming etc/rc.d/rc.privoxy.new
-else
- # Install executable otherwise - irrelevant unless user starts in rc.local
- chmod 0755 etc/rc.d/rc.privoxy.new
-fi
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
# If there's no existing log file, move this one over;
# otherwise, kill the new one
@@ -28,48 +29,14 @@ else
rm -f var/log/privoxy/logfile.new
fi
+preserve_perms etc/rc.d/rc.privoxy.new
config etc/privoxy/config.new
config etc/privoxy/default.action.new
config etc/privoxy/default.filter.new
config etc/privoxy/match-all.action.new
-config etc/privoxy/templates/blocked.new
-config etc/privoxy/templates/cgi-error-404.new
-config etc/privoxy/templates/cgi-error-bad-param.new
-config etc/privoxy/templates/cgi-error-disabled.new
-config etc/privoxy/templates/cgi-error-file-read-only.new
-config etc/privoxy/templates/cgi-error-file.new
-config etc/privoxy/templates/cgi-error-modified.new
-config etc/privoxy/templates/cgi-error-parse.new
-config etc/privoxy/templates/cgi-style.css.new
-config etc/privoxy/templates/connect-failed.new
-config etc/privoxy/templates/connection-timeout.new
-config etc/privoxy/templates/default.new
-config etc/privoxy/templates/edit-actions-add-url-form.new
-config etc/privoxy/templates/edit-actions-for-url-filter.new
-config etc/privoxy/templates/edit-actions-for-url.new
-config etc/privoxy/templates/edit-actions-list-button.new
-config etc/privoxy/templates/edit-actions-list-section.new
-config etc/privoxy/templates/edit-actions-list-url.new
-config etc/privoxy/templates/edit-actions-list.new
-config etc/privoxy/templates/edit-actions-remove-url-form.new
-config etc/privoxy/templates/edit-actions-url-form.new
-config etc/privoxy/templates/forwarding-failed.new
-config etc/privoxy/templates/mod-local-help.new
-config etc/privoxy/templates/mod-support-and-service.new
-config etc/privoxy/templates/mod-title.new
-config etc/privoxy/templates/mod-unstable-warning.new
-config etc/privoxy/templates/no-server-data.new
-config etc/privoxy/templates/no-such-domain.new
-config etc/privoxy/templates/show-request.new
-config etc/privoxy/templates/show-status-file.new
-config etc/privoxy/templates/show-status.new
-config etc/privoxy/templates/show-url-info.new
-config etc/privoxy/templates/show-version.new
-config etc/privoxy/templates/toggle-mini.new
-config etc/privoxy/templates/toggle.new
-config etc/privoxy/templates/untrusted.new
-config etc/privoxy/templates/url-info-osd.xml.new
config etc/privoxy/trust.new
config etc/privoxy/user.action.new
config etc/privoxy/user.filter.new
-config etc/rc.d/rc.privoxy.new
+for conf_file in etc/privoxy/templates/*.new; do
+ config $conf_file
+done