From 799280877fbe7a43dab9c3af1dd509519e2f542b Mon Sep 17 00:00:00 2001 From: Stan Grishin Date: Mon, 11 Dec 2023 13:06:12 +0000 Subject: luci-app-https-dns-proxy: update to 2023-10-25-5 * no longer "require uci" in js files * use L.resolveDefault when loading configs * improve DNSMASQ config update selection user experience * switch from uci.get to L.uci.get * small code improvement of RPCD script Signed-off-by: Stan Grishin --- .../root/usr/libexec/rpcd/luci.https-dns-proxy | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'applications/luci-app-https-dns-proxy/root/usr/libexec') diff --git a/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy b/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy index 7c59f90c38..593af173fc 100755 --- a/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy +++ b/applications/luci-app-https-dns-proxy/root/usr/libexec/rpcd/luci.https-dns-proxy @@ -117,14 +117,11 @@ get_runtime() { ubus call service list "{ 'verbose': true, 'name': '$1' }"; } set_init_action() { local name="$1" action="$2" cmd case $action in - enable) - cmd="/etc/init.d/${name} enable";; - disable) - cmd="/etc/init.d/${name} disable";; - start|stop|restart) - cmd="/etc/init.d/${name} ${action}";; + enable|disable|start|stop|restart) + cmd="/etc/init.d/${name} ${action}" + ;; esac - if [ -n "$cmd" ] && eval "${cmd}" >/dev/null 2>&1; then + if [ -n "$cmd" ] && eval "$cmd" >/dev/null 2>&1; then print_json_bool "result" '1' else print_json_bool "result" '0' -- cgit v1.2.3