initial import
This commit is contained in:
23
haproxy/haproxy.install
Normal file
23
haproxy/haproxy.install
Normal file
@@ -0,0 +1,23 @@
|
||||
post_install() {
|
||||
if ! getent group haproxy &>/dev/null; then
|
||||
groupadd -r haproxy >& /dev/null
|
||||
fi
|
||||
if ! getent passwd haproxy &>/dev/null; then
|
||||
useradd -r -d /var/lib/haproxy -g haproxy -s /bin/false haproxy
|
||||
fi
|
||||
|
||||
chown gerbera:gerbera /var/lib/haproxy
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install $1
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
if getent passwd haproxy &>/dev/null; then
|
||||
userdel haproxy >/dev/null
|
||||
fi
|
||||
if getent group haproxy &>/dev/null; then
|
||||
groupdel haproxy >/dev/null
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user