Skip to content

Commit

Permalink
qzeleza#234 оформление
Browse files Browse the repository at this point in the history
  • Loading branch information
AltGrF13 authored and AltGrF13 committed Jan 7, 2025
1 parent 8065cb5 commit 6f0fd7f
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions opt/bin/main/setup
Original file line number Diff line number Diff line change
Expand Up @@ -268,14 +268,15 @@ stop_crypt(){
}

#------------------------------------------------------
# УДАЛЕНИЕ ФАЙЛОВ
# УДАЛЕНИЕ ФАЙЛОВ
#------------------------------------------------------
rm_dir()( [ -d "${1}" ] && rm -rf "${1}" || true)
rm_file()( [ -e "${1}" ] || [ -L "${1}" ] && rm -f "${1}" || true )

#------------------------------------------------------
# УДАЛЕНИЕ ФАЙЛОВ КОНФИГУРАЦИИ
# УДАЛЕНИЕ ФАЙЛОВ КОНФИГУРАЦИИ
#------------------------------------------------------
rm_package_files(){
rm_package_files() {
local full=${1:-no}

if [ "${full}" = full ] ; then
Expand Down Expand Up @@ -315,15 +316,12 @@ rm_package_files(){
} && when_ok || when_bad
}

set_previous_condition(){

set_previous_condition() {
full=${1:-no}

ready "Удаляем файлы конфигурации..."
rm_package_files "${full}" &> /dev/null && when_ok "УСПЕШНО" || when_bad "ОШИБКА"

#------------------------------------------------------
# ОЧИЩЕНИЕ ВСЕХ ПРАВИЛ И ТАБЛИЦ
#------------------------------------------------------
ready "Очищаем все правила и таблицы..."
ip4__flush &> /dev/null
if [ $? = 0 ]; then when_ok "УСПЕШНО"; else when_bad "ОШИБКА"; fi
Expand All @@ -338,8 +336,6 @@ set_previous_condition(){
if [ -f /opt/etc/init.d/S09dnscrypt-proxy2 ]; then
stop_crypt
fi


}

# восставившем архивные копии файлов конфигурации
Expand Down

0 comments on commit 6f0fd7f

Please sign in to comment.