Skip to content

Commit

Permalink
qzeleza#234 рефакторинг замены конфига dnsmasq
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGrF13 authored and AltGrF13 committed Jan 4, 2025
1 parent 9ae18c8 commit 934c76f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions opt/bin/libs/vpn
Original file line number Diff line number Diff line change
Expand Up @@ -1240,10 +1240,13 @@ dnsmasq_install(){
/opt/etc/init.d/S56dnsmasq stop 1> /dev/null 2> "${ERROR_LOG_FILE}"
ready_status "${?}" "Невозможно остановить сервис dnsmasq"
fi
ready "Заменяем файл конфигурации dnsmasq... "
[ -f /opt/etc/dnsmasq.conf ] && mv -f /opt/etc/dnsmasq.conf "${KVAS_BACKUP_PATH}/dnsmasq.conf" 1> /dev/null 2> "${ERROR_LOG_FILE}"
cp /opt/apps/kvas/etc/conf/dnsmasq.conf /opt/etc/dnsmasq.conf 1> /dev/null 2> "${ERROR_LOG_FILE}"
ready_status "${?}" "Проблемы при замене в файле конфигурации dnsmasq"

ready 'Заменяем файл конфигурации dnsmasq... '
if [ -f "${DNSMASQ_CONFIG}" ]; then
mv -f "${DNSMASQ_CONFIG}" "${DNSMASQ_CONFIG_BACKUP}" 1>/dev/null 2>"${ERROR_LOG_FILE}"
fi
cp '/opt/apps/kvas/etc/conf/dnsmasq.conf' "${DNSMASQ_CONFIG}" 1>/dev/null 2>"${ERROR_LOG_FILE}"
ready_status "${?}" 'Проблемы при замене в файле конфигурации dnsmasq'

# dnsmasq_install_wildcard_support

Expand Down

0 comments on commit 934c76f

Please sign in to comment.