File: syslog-ng-mod-common.maintscript

package info (click to toggle)
syslog-ng 3.8.1-10
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 47,320 kB
  • ctags: 43,937
  • sloc: ansic: 159,432; yacc: 25,059; sh: 13,574; makefile: 4,669; python: 3,468; java: 3,218; xml: 2,309; perl: 318; lex: 316; awk: 184
file content (35 lines) | stat: -rw-r--r-- 1,080 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#! /bin/sh
## Common preinst, postinst and postrm script for syslog-ng-mod-*
## packages. Some of the modules in syslog-ng-3.3 came with a
## 00load-$mod config file, which are being removed in 3.4. This file
## does the necessary dpkg-maintscript-helper voodoo to get rid of
## them.
##
## To avoid duplication, only one file is written, the rest are
## symlinked to it.

set -e

case "${DPKG_MAINTSCRIPT_PACKAGE}" in
        syslog-ng-mod-json)
                modname="tfjson"
                ;;
        syslog-ng-mod-sql|syslog-ng-mod-mongodb)
                modname="${DPKG_MAINTSCRIPT_PACKAGE#syslog-ng-mod-}"
                ;;
        *)
                echo "rm_conffile voodoo unsupported for package ${DPKG_MAINTSCRIPT_PACKAGE}!" >&2
                exit 1
                ;;
esac

if [ -x "/usr/bin/dpkg-maintscript-helper" ]; then
        if dpkg-maintscript-helper supports rm_conffile; then
                dpkg-maintscript-helper rm_conffile \
                        /etc/syslog-ng/conf.d/00load-${modname}.conf 3.4.0~ -- "$@"
        fi
fi

#DEBHELPER#

exit 0