From bbc1b23210115cd551f4f7d43a332dc783e361fe Mon Sep 17 00:00:00 2001 From: AltGrF13 Date: Wed, 1 Jan 2025 07:26:57 +0300 Subject: [PATCH] =?UTF-8?q?#234=20=D1=80=D0=B5=D1=84=D0=B0=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D0=B1=D0=B5=D0=BA=D0=B0=D0=BF?= =?UTF-8?q?=D0=B0=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D0=B0=20dnscrypt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- opt/bin/libs/vpn | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/opt/bin/libs/vpn b/opt/bin/libs/vpn index f049fdf..486ed26 100644 --- a/opt/bin/libs/vpn +++ b/opt/bin/libs/vpn @@ -2442,15 +2442,10 @@ dns_crypt_install() { ready_status "${?}" "Проблема при остановке службы dnscrypt-proxy2" fi -# архивируем предыдущие настройки - if [ -f '/opt/etc/dnscrypt-proxy.toml' ]; then - #warning "Файл конфигурации dnscrypt-proxy2 сохраняем" - cp /opt/etc/dnscrypt-proxy.toml ${KVAS_BACKUP_PATH}/dnscrypt-proxy.toml - #warning "под именем ${KVAS_BACKUP_PATH}/dnscrypt-proxy.toml" - elif [ -f "${KVAS_BACKUP_PATH}/dnscrypt-proxy.toml" ]; then - #warning "Обнаружен файл конфигурации dnscrypt-proxy2 " - cp "${KVAS_BACKUP_PATH}/dnscrypt-proxy.toml" /opt/etc/dnscrypt-proxy.toml - #warning "Восстанавливаем предыдущие настройки." + if [ -f "${DNSCRYPT_CONFIG}" ]; then + cp -f "${DNSCRYPT_CONFIG}" "${DNSCRYPT_CONFIG_BACKUP}" + elif [ -f "${DNSCRYPT_CONFIG_BACKUP}" ]; then + cp "${DNSCRYPT_CONFIG_BACKUP}" "${DNSCRYPT_CONFIG}" fi # Настраиваем сервис