#!/bin/sh

TPREDIR=/opt/lnxall_app
CFGFILE=${TPREDIR}/etc/mosquitto/mosquitto.conf
export PATH=${TPREDIR}/bin:${TPREDIR}/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin

if [ ! -e ${CFGFILE} ] ; then
	echo "Error, configuration file not found: ${CFGFILE}"
	sleep 15
	exit 1
fi
exec mosquitto -c ${CFGFILE}
