23 lines
588 B
Bash
23 lines
588 B
Bash
#!/bin/sh
|
|
# postinst maintainer script for foo-pgsql
|
|
|
|
case "$1" in
|
|
configure)
|
|
if ! readlink -q /etc/haproxy/haproxy.cfg; then
|
|
echo Using amue-haproxy configuration for haproxy \(symlink to /usr/share/amue-haproxy/\)...
|
|
ln -b -s /etc/haproxy/haproxy-amue.cfg /etc/haproxy/haproxy.cfg
|
|
fi
|
|
if grep -q ENABLED=0 /etc/default/haproxy; then
|
|
echo Activating HAProxy...
|
|
sed -i 's/ENABLED=0/ENABLED=1/' /etc/default/haproxy
|
|
fi
|
|
echo Restarting stud and haproxy...
|
|
invoke-rc.d stud stop
|
|
sleep 1
|
|
invoke-rc.d stud start
|
|
invoke-rc.d haproxy restart
|
|
;;
|
|
esac
|
|
|
|
#DEBHELPER#
|