mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-22 23:12:32 +00:00
1f11a4e283
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>
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
|