#!/bin/sh set -e spawn-fcgi -a 0.0.0.0 -p 9100 -F 20 -f "php /var/www/html/mobile/mobile_run.php" time=$(date "+%Y%m%d") if [ ! -f "/var/www/html/data/log/${time}-mobile.log" ]; then touch "/var/www/html/data/log/${time}-mobile.log" fi tail -f "/var/www/html/data/log/${time}-mobile.log"