File: syslog-ng.postrm

package info (click to toggle)
syslog-ng 2.0.0-1etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 1,844 kB
  • ctags: 2,014
  • sloc: ansic: 9,125; xml: 2,125; sh: 1,210; yacc: 741; lex: 278; makefile: 191; awk: 94; python: 85; perl: 49
file content (26 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -e

if [ "$1" = "remove" ]; then
    # disable log rotation on removal
    # main file
    [ -f /etc/logrotate.d/syslog-ng ] && mv -f /etc/logrotate.d/syslog-ng /etc/logrotate.d/syslog-ng.disabled
    if [ -x "/etc/init.d/syslog-ng" ]; then
        if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
            invoke-rc.d syslog-ng stop ||true
        else
            /etc/init.d/syslog-ng stop ||true
        fi
    fi
fi

# remove disabled files on purge or complete overwrite.
if [ "$1" = "purge" -o "$1" = "dissappear" ]; then
    # main file
    [ -f /etc/logrotate.d/syslog-ng.disabled ] && rm -f /etc/logrotate.d/syslog-ng.disabled
fi

#DEBHELPER#

exit 0