From 2f5fce36e4efb68e657886fafccbc825e6d31608 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 26 Jun 2016 16:56:14 -0400 Subject: [PATCH] Handle purging the dokku user, group, and logs directory during `apt-get purge` Closes #2106 [ci skip] --- debian/postrm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/postrm b/debian/postrm index 9e9feac9d..859fec170 100755 --- a/debian/postrm +++ b/debian/postrm @@ -8,6 +8,7 @@ fi readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}" readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}" +readonly DOKKU_LOGS_DIR="${DOKKU_LOGS_DIR:="/var/log/dokku"}" main() { if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then @@ -40,6 +41,11 @@ main() { find ${DOKKU_ROOT} -type d -empty -delete fi + rm -rf "${DOKKU_LOGS_DIR}" + + deluser dokku || true + delgroup dokku || true + db_purge fi }