From 4bb5dd6a18b470c1887def0163c972fbac0196da Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Tue, 13 Jan 2026 08:02:36 -0800 Subject: [PATCH] fix(scripts): remove disk info file on uninstall --- install/uninstall_nomad.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install/uninstall_nomad.sh b/install/uninstall_nomad.sh index 836d257..006f1cd 100644 --- a/install/uninstall_nomad.sh +++ b/install/uninstall_nomad.sh @@ -18,6 +18,7 @@ NOMAD_DIR="/opt/project-nomad" MANAGEMENT_COMPOSE_FILE="${NOMAD_DIR}/compose.yml" COLLECT_DISK_INFO_PID="/var/run/nomad-collect-disk-info.pid" +DISK_INFO_FILE="/tmp/nomad-disk-info.json" ################################################################################################################################################################################################### # # @@ -86,6 +87,14 @@ try_remove_disk_info_script() { fi } +try_remove_disk_info_file() { + if [ -f "$DISK_INFO_FILE" ]; then + echo "Removing disk info file..." + rm -f "$DISK_INFO_FILE" + echo "Disk info file removed." + fi +} + uninstall_nomad() { echo "Stopping and removing Project N.O.M.A.D. management containers..." docker compose -f "${MANAGEMENT_COMPOSE_FILE}" down @@ -104,6 +113,9 @@ uninstall_nomad() { # Try to stop the collect-disk-info script if it's running try_remove_disk_info_script + # Try to remove the disk info file if it exists + try_remove_disk_info_file + echo "Removing Project N.O.M.A.D. files..." rm -rf "${NOMAD_DIR}"