aboutsummaryrefslogtreecommitdiffstats
path: root/main/haproxy/haproxy.pre-upgrade
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-08-24 09:35:56 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-08-16 12:50:06 +0000
commitef4d70929c7b687a7b974e9ae438f6b8a164f16f (patch)
tree6041f94bf7a848bc2f26bf98f021ecf3456cab55 /main/haproxy/haproxy.pre-upgrade
parent4bbb93d659452066ebe032015d4ccdbbc9f57abb (diff)
downloadaports-ef4d70929c7b687a7b974e9ae438f6b8a164f16f.tar.bz2
aports-ef4d70929c7b687a7b974e9ae438f6b8a164f16f.tar.xz
main/haproxy: move default config location
- move default config location to /etc/haproxy/ - provide install/upgrade script that moves existing config to new location - provide dummy config - create haproxy user and group
Diffstat (limited to 'main/haproxy/haproxy.pre-upgrade')
-rw-r--r--main/haproxy/haproxy.pre-upgrade12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/haproxy/haproxy.pre-upgrade b/main/haproxy/haproxy.pre-upgrade
new file mode 100644
index 0000000000..fa9083dc41
--- /dev/null
+++ b/main/haproxy/haproxy.pre-upgrade
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+addgroup haproxy 2>/dev/null
+adduser -S -H -h /usr/share/haproxy -s /bin/false -D \
+ -G haproxy haproxy 2>/dev/null
+
+# move config to new location
+if [ -e /etc/haproxy.cfg ] && ! [ -e /etc/haproxy/haproxy.cfg ]; then
+ mkdir -p /etc/haproxy
+ mv /etc/haproxy.cfg /etc/haproxy/haproxy.cfg
+fi
+