summaryrefslogtreecommitdiffstats
path: root/debian/rsyslog.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rsyslog.postinst')
-rw-r--r--debian/rsyslog.postinst42
1 files changed, 42 insertions, 0 deletions
diff --git a/debian/rsyslog.postinst b/debian/rsyslog.postinst
new file mode 100644
index 0000000..b01dd34
--- /dev/null
+++ b/debian/rsyslog.postinst
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+ configure)
+ # Fix permissions of the spool/work directory (Bug: #693099)
+ chmod 700 /var/spool/rsyslog
+
+ if dpkg --compare-versions "$2" lt-nl "8.2110.0-2"; then
+ update-rc.d -f rsyslog remove || true
+ fi
+ ;;
+
+ triggered)
+ # Try to restart rsyslog
+ invoke-rc.d rsyslog try-restart || true
+ exit 0
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+#DEBHELPER#