From ff43f477e92db4b08ccac46777dd465c570c815d Mon Sep 17 00:00:00 2001 From: Andrey Petelin Date: Wed, 26 Nov 2025 14:14:27 +0500 Subject: [PATCH] chore: restore shutdown_correctly logic --- podkop/files/usr/bin/podkop | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/podkop/files/usr/bin/podkop b/podkop/files/usr/bin/podkop index 59dfa1a..a7c2779 100755 --- a/podkop/files/usr/bin/podkop +++ b/podkop/files/usr/bin/podkop @@ -137,9 +137,6 @@ start_main() { exit 1 fi - uci_set "podkop" "settings" "shutdown_correctly" 0 - uci commit "podkop" && config_load "$PODKOP_CONFIG" - log "Nice" list_update & echo $! > /var/run/podkop_list_update.pid @@ -178,17 +175,18 @@ stop_main() { log "Stop sing-box" /etc/init.d/sing-box stop - - uci_set "podkop" "settings" "shutdown_correctly" 1 - uci commit "podkop" && config_load "$PODKOP_CONFIG" } start() { start_main + config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0 if [ "$dont_touch_dhcp" -eq 0 ]; then dnsmasq_configure fi + + uci_set "podkop" "settings" "shutdown_correctly" 0 + uci commit "podkop" && config_load "$PODKOP_CONFIG" } stop() { @@ -197,7 +195,11 @@ stop() { if [ "$dont_touch_dhcp" -eq 0 ]; then dnsmasq_restore fi + stop_main + + uci_set "podkop" "settings" "shutdown_correctly" 1 + uci commit "podkop" && config_load "$PODKOP_CONFIG" } reload() {