Skip to content

Commit

Permalink
luci-app-openclash: Fix $ sign not escaping correctly. (#4217)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxlhhyccc authored Dec 9, 2024
1 parent 72847cc commit bbbcde4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions luci-app-openclash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ endef

define Package/$(PKG_NAME)/postrm
#!/bin/sh
DEFAULT_DNSMASQ_CFGID="$(uci -q show "dhcp.@dnsmasq[0]" | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')"
DEFAULT_DNSMASQ_CFGID="$$(uci -q show "dhcp.@dnsmasq[0]" | awk 'NR==1 {split($0, conf, /[.=]/); print conf[2]}')"
if [ -f "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID" ]; then
DNSMASQ_CONF_DIR="$(awk -F '=' '/^conf-dir=/ {print $2}' "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID")"
DNSMASQ_CONF_DIR="$$(awk -F '=' '/^conf-dir=/ {print $2}' "/tmp/etc/dnsmasq.conf.$DEFAULT_DNSMASQ_CFGID")"
else
DNSMASQ_CONF_DIR="/tmp/dnsmasq.d"
fi
DNSMASQ_CONF_DIR=${DNSMASQ_CONF_DIR%*/}
DNSMASQ_CONF_DIR=$${DNSMASQ_CONF_DIR%*/}
rm -rf /etc/openclash >/dev/null 2>&1
rm -rf /etc/config/openclash >/dev/null 2>&1
rm -rf /tmp/openclash.log >/dev/null 2>&1
Expand All @@ -152,8 +152,10 @@ define Package/$(PKG_NAME)/postrm
sed -i '/.*kB maximum content size*/c\export let HTTP_MAX_CONTENT = 1024*100; // 100 kB maximum content size' /usr/share/ucode/luci/http.uc >/dev/null 2>&1
uci -q delete firewall.openclash
uci -q commit firewall
[ -f "/etc/config/ucitrack" ] && {
uci -q delete ucitrack.@openclash[-1]
uci -q commit ucitrack
}
rm -rf /tmp/luci-*
exit 0
endef
Expand Down

0 comments on commit bbbcde4

Please sign in to comment.