#!/bin/sh
set -e
spawn-fcgi -a 0.0.0.0 -p 9100 -F 10 -f "php /var/www/html/fcgi_run.php"

time=$(date "+%Y%m%d")
#$logfile="/var/www/html/data/log/${time}.log"
#echo $logfile

if [ ! -f "/var/www/html/data/log/${time}.log" ]; then
    touch "/var/www/html/data/log/${time}.log"
fi

tail -f "/var/www/html/data/log/${time}.log"