Fixed rpcd issue
This commit is contained in:
parent
aa7810354c
commit
fd2a2dad87
@ -1804,9 +1804,18 @@ install_luci() {
|
|||||||
rm -rf /tmp/luci-indexcache* /tmp/luci-modulecache
|
rm -rf /tmp/luci-indexcache* /tmp/luci-modulecache
|
||||||
log "LuCI page installed: Services -> mihomo-kit"
|
log "LuCI page installed: Services -> mihomo-kit"
|
||||||
[ "$_rpcd" = 1 ] || return 0
|
[ "$_rpcd" = 1 ] || return 0
|
||||||
# rpcd loads plugins only on start; delayed so a job started from LuCI
|
# rpcd loads plugins and ACLs only on start. Not "rpcd restart": run from a job LuCI
|
||||||
# (kit update) gets to finish first
|
# started (kit update) this shell is rpcd's descendant, and the stop can take it down
|
||||||
(sleep 5; /etc/init.d/rpcd restart) < /dev/null > /dev/null 2>&1 &
|
# before the start - rpcd stays dead, LuCI says "Object not found" and rejects the
|
||||||
|
# password until a reboot. SIGHUP (through procd: to rpcd itself, not its plugins)
|
||||||
|
# makes rpcd re-exec in place and keep the LuCI sessions; then make sure it runs.
|
||||||
|
# Delayed so the job gets to finish first.
|
||||||
|
(
|
||||||
|
sleep 5
|
||||||
|
ubus call service signal '{"name":"rpcd","signal":1}' || kill -HUP "$(pidof rpcd | cut -d' ' -f1)"
|
||||||
|
sleep 5
|
||||||
|
pidof rpcd || /etc/init.d/rpcd start
|
||||||
|
) < /dev/null > /dev/null 2>&1 &
|
||||||
}
|
}
|
||||||
|
|
||||||
enable_otp_cron() {
|
enable_otp_cron() {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user