mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 09:39:00 +00:00
432ec292cc
The rpcd service is an important service, but if the service stops working for any reason, no one will ever respawn that service. With this commit, the procd service will monitor if the rpcd service is running. If the rpcd service has crashed, then procd respawns the rpcd service. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
22 lines
413 B
Bash
Executable File
22 lines
413 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
START=12
|
|
|
|
USE_PROCD=1
|
|
NAME=rpcd
|
|
PROG=/sbin/rpcd
|
|
|
|
start_service() {
|
|
local socket=$(uci -q get rpcd.@rpcd[0].socket)
|
|
local timeout=$(uci -q get rpcd.@rpcd[0].timeout)
|
|
|
|
procd_open_instance
|
|
procd_set_param command "$PROG" ${socket:+-s "$socket"} ${timeout:+-t "$timeout"}
|
|
procd_set_param respawn ${respawn_retry:-0}
|
|
procd_close_instance
|
|
}
|
|
|
|
reload_service() {
|
|
procd_send_signal rpcd
|
|
}
|