From 183084e71459b31b29525d18480897d18f538b9e Mon Sep 17 00:00:00 2001 From: Ilya Mukhortov Date: Fri, 10 Apr 2026 17:18:21 +1000 Subject: [PATCH 1/3] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB?= =?UTF-8?q?=20uninstall?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uninstall.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100644 index 0000000..f021d18 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Проверка root/sudo +if ! command -v sudo >/dev/null 2>&1; then + echo "Ошибка: sudo не найден." + exit 1 +fi + +sudo -u medicine bash <<'EOF' +set -euo pipefail + +BASE="$HOME/medicine-config" + +if [ -d "$BASE" ]; then + cd "$BASE/medicine" && docker compose down + cd "$BASE/postgres" && docker compose down + cd "$BASE/redis" && docker compose down + cd "$BASE/dashboard" && docker compose down + + docker images -q --filter=reference='docker.med-logic.ru/*' | xargs -r docker rmi -f + + rm -rf "$BASE" +fi +EOF + +echo "Готово. Все контейнеры установлены и удалены." \ No newline at end of file From 197d9bdee932fce98422c37fc0354ea067aa7b23 Mon Sep 17 00:00:00 2001 From: Ilya Mukhortov Date: Fri, 10 Apr 2026 17:21:16 +1000 Subject: [PATCH 2/3] change perms uninstall --- uninstall.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh old mode 100644 new mode 100755 From 460eb1703247f95fe5d6b6f978bb9a851b56223b Mon Sep 17 00:00:00 2001 From: Ilya Mukhortov Date: Fri, 10 Apr 2026 17:30:41 +1000 Subject: [PATCH 3/3] pass --- uninstall.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uninstall.sh b/uninstall.sh index f021d18..41c7213 100755 --- a/uninstall.sh +++ b/uninstall.sh @@ -24,4 +24,4 @@ if [ -d "$BASE" ]; then fi EOF -echo "Готово. Все контейнеры установлены и удалены." \ No newline at end of file +echo "Готово. Все контейнеры остановлены и удалены." \ No newline at end of file