diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-08-24 09:35:56 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-08-16 12:50:06 +0000 |
commit | ef4d70929c7b687a7b974e9ae438f6b8a164f16f (patch) | |
tree | 6041f94bf7a848bc2f26bf98f021ecf3456cab55 /main/haproxy/haproxy.pre-upgrade | |
parent | 4bbb93d659452066ebe032015d4ccdbbc9f57abb (diff) | |
download | aports-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-upgrade | 12 |
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 + |