#!/bin/sh LOG_PATH="/app/var/log/${APP_ENV}.log" # only attempt logging if we have enabled logging # and the log file exists. if [ "${APP_LOG}" == "1" ] then if [ -f ${LOG_PATH} ] then # attempt to tail the log one line at a time. # the supervisor job will push output to STDOUT. echo "Now tailing ${LOG_PATH}..." tail -f -n 1 ${LOG_PATH} else echo "Cannot find ${LOG_PATH}. Will now exit..." fi fi