summaryrefslogtreecommitdiff
path: root/debian/echolot.postinst
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-11-14 22:34:20 +0000
committerPeter Palfrader <peter@palfrader.org>2004-11-14 22:34:20 +0000
commitda03613b37f02bca8a3960b34a56f0d25470185a (patch)
treeb72fa26ff8e607b0b8e76a04bfb69f9a2d7e4aac /debian/echolot.postinst
parent716a492f46e41548947f7fd9b8a172279edc8426 (diff)
remove debconf stuff
Diffstat (limited to 'debian/echolot.postinst')
-rwxr-xr-xdebian/echolot.postinst43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/echolot.postinst b/debian/echolot.postinst
new file mode 100755
index 0000000..59cd723
--- /dev/null
+++ b/debian/echolot.postinst
@@ -0,0 +1,43 @@
+#!/bin/sh -e
+
+# postinst for Echolot
+
+. /usr/share/debconf/confmodule
+
+# Make sure the echolot user exists
+adduser --quiet \
+ --quiet \
+ --system \
+ --disabled-password \
+ --shell /bin/bash \
+ --home /var/lib/echolot \
+ --no-create-home \
+ --group \
+ --gecos "Echolot Pinger" \
+ echolot
+
+# Give the echolot user write permissions to /var/log/echolot/echolot.log
+touch /var/log/echolot/echolot.log
+chown echolot.adm /var/log/echolot/echolot.log
+chmod 640 /var/log/echolot/echolot.log
+# and /var/lib/echolot
+if ( ! dpkg-statoverride --list /var/lib/echolot > /dev/null ); then
+ dpkg-statoverride --update --add root echolot 02775 /var/lib/echolot
+fi
+# and /var/run/echolot
+if ( ! dpkg-statoverride --list /var/run/echolot > /dev/null ); then
+ dpkg-statoverride --update --add root echolot 02770 /var/run/echolot
+fi
+
+# remove debconf stuff
+if [ "$1" = "configure" ] && [ -e /usr/share/debconf/confmodule ]; then
+ if dpkg --compare-versions "$2" lt "2.1.7" ; then
+ /usr/share/debconf/confmodule
+ db_purge
+ fi
+fi
+
+#DEBHELPER#
+
+# vim:set ts=4:
+# vim:set shiftwidth=4: