This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
amue-authentic2/debian/amue-haproxy.postinst

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#