#!/bin/sh
set -e

php /var/www/html/xyzshop/searcher.php

time=$(date "+%Y%m%d")
appid='search'

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

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