From bdd3581e8a1ea8a2e0bdb639f3c0a8f400b35572 Mon Sep 17 00:00:00 2001 From: iqubik Date: Sat, 4 Apr 2026 22:51:22 +0300 Subject: [PATCH] =?UTF-8?q?fix(delete-custom):=20=D1=83=D0=B4=D0=B0=D0=BB?= =?UTF-8?q?=D1=8F=D1=82=D1=8C=20hysteria-server@.service=20=D0=B8=20/etc/h?= =?UTF-8?q?ysteria=20=D0=BF=D0=BE=D0=BB=D0=BD=D0=BE=D1=81=D1=82=D1=8C?= =?UTF-8?q?=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- delete-custom.sh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/delete-custom.sh b/delete-custom.sh index 0bd5513..52a4b69 100644 --- a/delete-custom.sh +++ b/delete-custom.sh @@ -140,10 +140,18 @@ if [[ $REMOVE_HYSTERIA -eq 1 ]]; then # Удаляем systemd unit if [[ -f /etc/systemd/system/hysteria-server.service ]]; then rm -f /etc/systemd/system/hysteria-server.service - systemctl daemon-reload log "Unit hysteria-server.service удалён" fi + # Удаляем шаблон unit'а (hysteria-server@.service) + if [[ -f /etc/systemd/system/hysteria-server@.service ]]; then + rm -f /etc/systemd/system/hysteria-server@.service + log "Unit hysteria-server@.service удалён" + fi + + # Перезагружаем systemd + systemctl daemon-reload + # Удаляем бинарник if command -v hysteria &>/dev/null; then HYSTERIA_BIN="$(command -v hysteria)" @@ -151,10 +159,10 @@ if [[ $REMOVE_HYSTERIA -eq 1 ]]; then log "Бинарник hysteria удалён: $HYSTERIA_BIN" fi - # Удаляем конфиг - if [[ -f /etc/hysteria/config.yaml ]]; then - rm -f /etc/hysteria/config.yaml - log "Конфиг Hysteria удалён" + # Удаляем конфиг и пустую директорию + if [[ -d /etc/hysteria ]]; then + rm -rf /etc/hysteria + log "Директория /etc/hysteria удалена" fi # Удаляем firewall правила Hysteria