mirror of
https://github.com/itdoginfo/podkop.git
synced 2025-12-07 12:06:56 +03:00
chore: restore shutdown_correctly logic
This commit is contained in:
@@ -137,9 +137,6 @@ start_main() {
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
uci_set "podkop" "settings" "shutdown_correctly" 0
|
|
||||||
uci commit "podkop" && config_load "$PODKOP_CONFIG"
|
|
||||||
|
|
||||||
log "Nice"
|
log "Nice"
|
||||||
list_update &
|
list_update &
|
||||||
echo $! > /var/run/podkop_list_update.pid
|
echo $! > /var/run/podkop_list_update.pid
|
||||||
@@ -178,17 +175,18 @@ stop_main() {
|
|||||||
|
|
||||||
log "Stop sing-box"
|
log "Stop sing-box"
|
||||||
/etc/init.d/sing-box stop
|
/etc/init.d/sing-box stop
|
||||||
|
|
||||||
uci_set "podkop" "settings" "shutdown_correctly" 1
|
|
||||||
uci commit "podkop" && config_load "$PODKOP_CONFIG"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
start_main
|
start_main
|
||||||
|
|
||||||
config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0
|
config_get_bool dont_touch_dhcp "settings" "dont_touch_dhcp" 0
|
||||||
if [ "$dont_touch_dhcp" -eq 0 ]; then
|
if [ "$dont_touch_dhcp" -eq 0 ]; then
|
||||||
dnsmasq_configure
|
dnsmasq_configure
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
uci_set "podkop" "settings" "shutdown_correctly" 0
|
||||||
|
uci commit "podkop" && config_load "$PODKOP_CONFIG"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
@@ -197,7 +195,11 @@ stop() {
|
|||||||
if [ "$dont_touch_dhcp" -eq 0 ]; then
|
if [ "$dont_touch_dhcp" -eq 0 ]; then
|
||||||
dnsmasq_restore
|
dnsmasq_restore
|
||||||
fi
|
fi
|
||||||
|
|
||||||
stop_main
|
stop_main
|
||||||
|
|
||||||
|
uci_set "podkop" "settings" "shutdown_correctly" 1
|
||||||
|
uci commit "podkop" && config_load "$PODKOP_CONFIG"
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
|
|||||||
Reference in New Issue
Block a user