diff options
author | Peter Palfrader <peter@palfrader.org> | 2006-03-06 15:10:03 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2006-03-06 15:10:03 +0000 |
commit | 0a27014ee8ba24a3ca3d78cefdeda8ba391e42ba (patch) | |
tree | 2d08c30a4ece1139d9f203be2ecc3b25a45bfec4 /trunk/debian/echolot.postinst | |
parent | 0468b8a264c429c66a92ff56e012f6f794603f09 (diff) |
Tag as release_2_1_8-4, againecholot-2.1.8-4
Diffstat (limited to 'trunk/debian/echolot.postinst')
-rwxr-xr-x | trunk/debian/echolot.postinst | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/trunk/debian/echolot.postinst b/trunk/debian/echolot.postinst new file mode 100755 index 0000000..4004475 --- /dev/null +++ b/trunk/debian/echolot.postinst @@ -0,0 +1,41 @@ +#!/bin/sh -e + +# postinst for Echolot +# remove old 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 + db_stop + fi +fi + +# 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 + +#DEBHELPER# + +# vim:set ts=4: +# vim:set shiftwidth=4: |