kumquat-buildroot/package/owfs/S55owserver
Arnout Vandecappelle (Essensium/Mind) c5a0c6f7ca package/owfs: delay sysvinit start until after network and avahi
In its default configuration, owserver opens a TCP socket on the 'lo'
interface. However, in some situations, the 'lo' interface may not yet
be up until S40network is started. This causes owserver not to start its
TCP socket, which makes it impossible for the owfs client to connect to
it.

In addition, owserver may have avahi integration.

Therefore, delay the start of owserver and owfs until after S40network
and S50avahi-daemon.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit efc6ccbddc)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2019-05-10 12:13:42 +02:00

32 lines
634 B
Plaintext

NAME="owserver"
DAEMON="/usr/bin/${NAME}"
PID_F="/run/${NAME}.pid"
OWSERVER_ARGS=
[ -r /etc/default/${NAME} ] && . /etc/default/${NAME}
case "$1" in
start)
printf "Starting ${NAME}: "
if [ -z "${OWSERVER_ARGS}" ]; then
echo "OWSERVER_ARGS must be set in defaults file" 1>&2
exit 1
fi
start-stop-daemon -S -x ${DAEMON} -- \
--pid_file ${PID_F} ${OWSERVER_ARGS}
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
;;
stop)
printf "Stopping ${NAME}: "
start-stop-daemon -K -p ${PID_F}
[ $? -eq 0 ] && echo "OK" || echo "FAIL"
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac