| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# summary of how this script can be called: |
| 6 |
# * <postinst> `configure' <most-recently-configured-version> |
| 7 |
# * <old-postinst> `abort-upgrade' <new version> |
| 8 |
# * <conflictor's-postinst> `abort-remove' `in-favour' <package> |
| 9 |
# <new-version> |
| 10 |
# * <postinst> `abort-remove' |
| 11 |
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' |
| 12 |
# <failed-install-package> <version> `removing' |
| 13 |
# <conflicting-package> <version> |
| 14 |
# for details, see http://www.debian.org/doc/debian-policy/ or |
| 15 |
# the debian-policy package |
| 16 |
|
| 17 |
. /usr/share/debconf/confmodule |
| 18 |
. /usr/share/dbconfig-common/dpkg/postinst.mysql |
| 19 |
|
| 20 |
|
| 21 |
dbc_generate_include_args="-o template_infile=/usr/share/rsyslog-mysql/rsyslog-mysql.conf.template" |
| 22 |
dbc_generate_include=template:/etc/rsyslog.d/mysql.conf |
| 23 |
dbc_go rsyslog-mysql $@ |
| 24 |
|
| 25 |
|
| 26 |
case "$1" in |
| 27 |
configure) |
| 28 |
ucfr rsyslog-mysql /etc/rsyslog.d/mysql.conf |
| 29 |
|
| 30 |
invoke-rc.d rsyslog restart |
| 31 |
;; |
| 32 |
|
| 33 |
abort-upgrade|abort-remove|abort-deconfigure) |
| 34 |
;; |
| 35 |
|
| 36 |
*) |
| 37 |
echo "postinst called with unknown argument \`$1'" >&2 |
| 38 |
exit 1 |
| 39 |
;; |
| 40 |
esac |
| 41 |
|
| 42 |
|
| 43 |
#DEBHELPER# |