iopsys-feed/mcastmngr/files/common/etc/init.d/mcast
Anatoly Mirin 95471502d7 mcastmngr: integrate mcproxy
linux/lib/mcast/linux.sh converts mcastmngr UCI params to the
mcproxy native conf file.
2023-02-16 08:34:26 +00:00

61 lines
812 B
Bash
Executable file

#!/bin/sh /etc/rc.common
START=98
STOP=10
USE_PROCD=1
NAME=mcast
include /lib/network
include /lib/mcast
service_triggers() {
procd_add_reload_trigger network $NAME
}
start_mcast_service() {
local param=$@
procd_open_instance
procd_set_param command "${PROG_EXE}"
if [ -n "${param}" ]; then
procd_append_param command ${param}
fi
procd_set_param respawn
procd_close_instance
}
start_service() {
if [ -f "/etc/config/mcast" ]; then
configure_mcast
fi
if [ -z "${PROG_PARAMS}" ]; then
start_mcast_service
return
fi
local prev_IFS="${IFS}"
IFS=${PROG_PARAMS_SEPARATOR}
for param in ${PROG_PARAMS}; do
IFS="${prev_IFS}"
start_mcast_service ${param}
done
}
boot() {
setup_mcast_mode
start
}
stop_service() {
service_stop "${PROG_EXE}"
}
reload_service() {
stop
start
}