Index: debian/python-gnuboat.postinst
===================================================================
--- debian/python-gnuboat.postinst	(revision 60dee9446f9ff2e2de374638ffa58af25e4aa2c3)
+++ debian/python-gnuboat.postinst	(revision 60dee9446f9ff2e2de374638ffa58af25e4aa2c3)
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -e
+
+mkdir -p /var/spool/gnuboat
+mkdir -p /var/lib/gnuboat
+mkdir -p /var/log/gnuboat
+chown www-data:www-data /var/spool/gnuboat /var/lib/gnuboat /var/log/gnuboat
+
+
+#DEBHELPER#
+
+exit 0
Index: debian/python-gnuboat.prerm
===================================================================
--- debian/python-gnuboat.prerm	(revision 60dee9446f9ff2e2de374638ffa58af25e4aa2c3)
+++ debian/python-gnuboat.prerm	(revision 60dee9446f9ff2e2de374638ffa58af25e4aa2c3)
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+DIR_DATA="/var/lib/gnuboat/"
+DIR_LOG="/var/log/gnuboat/"
+DIR_SPOOL="/var/spool/gnuboat"
+
+rm -R "${DIR_SPOLL}"
+
+if [ "$(ls -A ${DIR_DATA})" ]; then
+	# do not remove the data directory
+	echo "Your data directory (${DIR_DATA}) is not empty. Leaving the data directory untouched!"
+else
+	rm -R "${DIR_DATA}"
+fi
+
+if [ "$(ls -A ${DIR_LOG})" ]; then
+        # do not remove the data directory
+        echo "Your log directory (${DIR_LOG}) is not empty. Leaving the log directory untouched!"
+else
+        rm -R "${DIR_LOG}"
+fi
+
+#DEBHELPER#
+
+exit 0
