Skip to content

Commit

Permalink
qzeleza#234 рефакторинг бекапа конфига dnscrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGrF13 authored and AltGrF13 committed Jan 4, 2025
1 parent 934c76f commit bbc1b23
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions opt/bin/libs/vpn
Original file line number Diff line number Diff line change
Expand Up @@ -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

# Настраиваем сервис
Expand Down

0 comments on commit bbc1b23

Please sign in to comment.