Handle purging the dokku user, group, and logs directory during apt-get purge

Closes #2106

[ci skip]
This commit is contained in:
Jose Diaz-Gonzalez
2016-06-26 16:56:14 -04:00
parent 2b019aef2f
commit 2f5fce36e4

6
debian/postrm vendored
View File

@@ -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
}