summaryrefslogtreecommitdiff
path: root/staging/squid/squid.install
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-11 15:22:39 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-11 15:22:39 -0300
commitd9929db3b4ad2dfeeb19ad71f6016eb8122d0208 (patch)
tree72944f18f0c554390a9ced86c8a8e2c06ce6cc47 /staging/squid/squid.install
parent54452120abed3fa83e394e89110859525788c0ea (diff)
parent306ac55c1e99cfb5801ef0d9acf2a11d3994d80d (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/hostapd/PKGBUILD extra/samba/PKGBUILD staging/ffmpeg/PKGBUILD
Diffstat (limited to 'staging/squid/squid.install')
-rw-r--r--staging/squid/squid.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/staging/squid/squid.install b/staging/squid/squid.install
new file mode 100644
index 000000000..e7aa5ff68
--- /dev/null
+++ b/staging/squid/squid.install
@@ -0,0 +1,26 @@
+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: http://www.squid-cache.org/Versions/v3/3.1/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
+}
+