Fix OpenWrt init ash syntax

This commit is contained in:
kzolotarev95 committed 2026-06-30 11:59:46 +04:00
1 parent 13290bf8ab
commit deb82b6104
2 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ config_enabled() {
stop_xray_processes() {
local config pids pid
config="$(uci_get xray_config /etc/xray/owrt-remote-client.json)"
pids="$((ps w 2>/dev/null || ps 2>/dev/null) | grep '[x]ray' | grep -F "$config" | awk '{print $1}')"
pids="$( (ps w 2>/dev/null || ps 2>/dev/null) | grep '[x]ray' | grep -F "$config" | awk '{print $1}')"
for pid in $pids; do
kill "$pid" >/dev/null 2>&1 || true
done
+2 -4
View File
@@ -2,7 +2,7 @@
KEY_FILE="${KEY_FILE:-/etc/owrt-remote/web.key}"
AGENT="${AGENT:-/usr/sbin/owrt-remote}"
OWRT_REMOTE_UI_VERSION="2026-06-30-stop-fix-centered-v19"
OWRT_REMOTE_UI_VERSION="2026-06-30-init-ash-fix-v20"
PARAMS_FILE="${TMPDIR:-/tmp}/owrt-remote-cgi.$$"
RESULT_TITLE=""
RESULT_BODY=""
@@ -268,12 +268,11 @@ EOF
}
render_page() {
local key router_id router_name hub_url vps_host service_state service_tone xray_state xray_tone enabled_checked status_text
local key router_id router_name hub_url service_state service_tone xray_state xray_tone enabled_checked status_text
key="$(param key)"
router_id="$(uci_get router_id main)"
router_name="$(uci_get router_name "$router_id")"
hub_url="$(uci_get hub_url '')"
vps_host="$(uci_get vps_host '')"
if service_enabled; then
service_state="enabled"
@@ -363,7 +362,6 @@ form{margin:0}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr
EOF
metric "procd service" "$service_state" "$service_tone"
metric "xray tunnel" "$xray_state" "$xray_tone"
metric "VPS host" "${vps_host:-не задан}" ""
if [ -n "$hub_url" ]; then
metric_link "Hub URL" "$hub_url" "$hub_url"
else