cloudron-support: also need to be remove any corrupt containerd

This commit is contained in:
Girish Ramakrishnan
2024-09-09 18:42:08 +02:00
parent 6742cdf373
commit a72c038435

View File

@@ -602,6 +602,7 @@ function ask_reboot() {
function recreate_docker() {
readonly logfile="/home/yellowtent/platformdata/logs/box.log"
readonly stagefile="/home/yellowtent/platformdata/recreate-docker-stage"
readonly containerd_root="/var/lib/containerd"
if ! docker_root=$(docker info -f '{{ .DockerRootDir }}' 2>/dev/null); then
warning "Unable to detect docker root. Assuming /var/lib/docker"
@@ -627,7 +628,7 @@ function recreate_docker() {
if grep -q "clearing_storage" "${stagefile}"; then
info "Clearing docker storage at ${docker_root}"
if ! rm -rf "${docker_root}/"*; then
if ! rm -rf "${docker_root}/"* "${containerd_root}/"*; then
echo -e "\nThe server has to be rebooted to clear the docker storage. After reboot,"
echo -e "run 'cloudron-support --recreate-docker' again.\n"
ask_reboot