mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
285c83a004
It allows checking if service is running. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
25 lines
411 B
Bash
Executable File
25 lines
411 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_close_instance
|
|
}
|
|
|
|
reload_service() {
|
|
procd_send_signal rpcd
|
|
}
|
|
|
|
service_running() {
|
|
procd_running rpcd
|
|
}
|