Handle purging the dokku user, group, and logs directory during apt-get purge
Closes #2106 [ci skip]
This commit is contained in:
6
debian/postrm
vendored
6
debian/postrm
vendored
@@ -8,6 +8,7 @@ fi
|
|||||||
|
|
||||||
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
readonly DOKKU_ROOT="${DOKKU_ROOT:-/home/dokku}"
|
||||||
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
readonly DOKKU_LIB_ROOT="${DOKKU_LIB_PATH:-/var/lib/dokku}"
|
||||||
|
readonly DOKKU_LOGS_DIR="${DOKKU_LOGS_DIR:="/var/log/dokku"}"
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
if [[ -f /etc/systemd/system/dokku-installer.conf ]] || [[ -f /etc/init/dokku-installer.conf ]]; then
|
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
|
find ${DOKKU_ROOT} -type d -empty -delete
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
rm -rf "${DOKKU_LOGS_DIR}"
|
||||||
|
|
||||||
|
deluser dokku || true
|
||||||
|
delgroup dokku || true
|
||||||
|
|
||||||
db_purge
|
db_purge
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user