summaryrefslogtreecommitdiff
path: root/extra/squid/squid.install
diff options
context:
space:
mode:
Diffstat (limited to 'extra/squid/squid.install')
-rw-r--r--extra/squid/squid.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/extra/squid/squid.install b/extra/squid/squid.install
new file mode 100644
index 000000000..85776358c
--- /dev/null
+++ b/extra/squid/squid.install
@@ -0,0 +1,28 @@
+post_install() {
+ if [ -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupadd -g 15 proxy &>/dev/null
+ fi
+
+ id proxy &>/dev/null || \
+ usr/sbin/useradd -u 15 -g proxy -d /var/empty proxy
+
+ chown proxy.proxy var/{cache,log}/squid
+
+ cat << EOF
+Release notes for version 2.7:
+ http://www.squid-cache.org/Versions/v2/2.7/RELEASENOTES.html
+
+EOF
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ usr/sbin/userdel proxy &> /dev/null
+ if [ ! -z "$(grep ^proxy: /etc/group)" ]; then
+ usr/sbin/groupdel proxy &>/dev/null
+ fi
+}
+