mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
1ca61b7b37
Use postinst script to reload service instead of uci-defaults hack. It's possible thanks to recent base-files change that executes postinst after uci-defaults. This fixes support for uhttpd customizations. It's possible (again) to adjust uhttpd config with custom uci-defaults before it gets started. Cc: Hauke Mehrtens <hauke@hauke-m.de> Fixes:d25d281fd6
("uhttpd: Reload config after uhttpd-mod-ubus was added") Ref:b799dd3c70
("base-files: execute package's "postinst" after executing uci-defaults") Signed-off-by: Rafał Miłecki <rafal@milecki.pl> (cherry picked from commit1f11a4e283
)
12 lines
251 B
Bash
12 lines
251 B
Bash
#!/bin/sh
|
|
|
|
if [ -z "$(uci -q get uhttpd.main.ubus_prefix)" ]; then
|
|
uci set uhttpd.main.ubus_prefix=/ubus
|
|
fi
|
|
|
|
[ "$(uci -q get uhttpd.main.ubus_socket)" = "/var/run/ubus.sock" ] && {
|
|
uci set uhttpd.main.ubus_socket='/var/run/ubus/ubus.sock'
|
|
}
|
|
|
|
exit 0
|