aboutsummaryrefslogtreecommitdiff
path: root/debian/postrm
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-12-10 13:25:27 -0500
committerB Stack <bgstack15@gmail.com>2020-12-10 13:25:27 -0500
commit1f05dba5702e3a9b13e9795310200821dd1e520c (patch)
treeb79ee1ade76d9cab46f282e269ba9b67ec1e1e8b /debian/postrm
parentadd initial Makefile for install, uninstall (diff)
downloadhex-zero-1f05dba5702e3a9b13e9795310200821dd1e520c.tar.gz
hex-zero-1f05dba5702e3a9b13e9795310200821dd1e520c.tar.bz2
hex-zero-1f05dba5702e3a9b13e9795310200821dd1e520c.zip
add debian/ and improve installation
Diffstat (limited to 'debian/postrm')
-rw-r--r--debian/postrm26
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/postrm b/debian/postrm
new file mode 100644
index 0000000..1d20f2a
--- /dev/null
+++ b/debian/postrm
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+
+#DEBHELPER#
+D=/var/www/hex-zero
+
+case "$1" in
+ purge)
+ update-rc.d -f hex-zero remove
+ rm -f ${D}/db.sqlite \
+ ${D}/migrations/__pycache__/* \
+ ${D}/migrations/* \
+ ${D}/migrations/versions/* 1>/dev/null 2>&1 || :
+ rmdir ${D}/migrations/__pycache__ ${D}/migrations/versions 1>/dev/null 2>&1 || :
+ rmdir ${D}/migrations 1>/dev/null 2>&1 || :
+ ;;
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
bgstack15