#!/bin/bash /etc/init.d/mosquitto start sleep 1 python /mqtt_logger/mqtt_logger/__init__.py # if argument(s) given - execute argument(s) in container. Otherwise loop. if [ "$#" -gt 0 ]; then exec $@ else while :; do sleep 1 done fi