iopsys-feed/mcastmngr/files/common/etc/init.d/mcast
Erik Karlsson 9cf5186546 Remove service_stop use
service_stop is a legacy function and it should never be used with
procd services which are automatically stopped by /etc/rc.common

Also remove unnecessary boot() which just runs the "start" function.
2023-04-18 05:59:55 +00:00

57 lines
764 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
}
reload_service() {
stop
start
}