summarylogtreecommitdiffstats
path: root/privoxy.install
diff options
context:
space:
mode:
Diffstat (limited to 'privoxy.install')
-rw-r--r--privoxy.install20
1 files changed, 20 insertions, 0 deletions
diff --git a/privoxy.install b/privoxy.install
new file mode 100644
index 00000000000..6c7632472b1
--- /dev/null
+++ b/privoxy.install
@@ -0,0 +1,20 @@
+post_install() {
+ groupadd -g 42 privoxy &>/dev/null
+ useradd -u 42 -g privoxy -d /var/spool/privoxy -s /bin/false privoxy &>/dev/null
+ chown -R privoxy:privoxy /etc/privoxy /var/log/privoxy
+ chmod 700 /etc/privoxy /var/log/privoxy
+
+ if [[ ! -d /var/spool/privoxy ]]; then
+ install -dm0700 -o privoxy -g privoxy /var/spool/privoxy
+ fi
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ userdel privoxy &>/dev/null
+ groupdel privoxy &>/dev/null
+ rm -rf var/spool/privoxy
+}