Docker + nginx + MySQL + PHP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
742 B

12 months ago
#!/bin/bash
############### XCDN启动脚本 ###############
#Author:xiaoz.me
#Update:2021-08-15
#Github:https://github.com/helloxz/xcdn
####################### END #######################
#运行时检查
function run_check(){
#检查nginx日志是否存在,如果不存在则创建
12 months ago
if [ ! -f "/usr/local/nginx/logs/error.log" ]
12 months ago
then
#创建日志文件夹
12 months ago
# mkdir -p /data/xcdn/logs;
touch /usr/local/nginx/logs/error.log
touch /usr/local/nginx/logs/stream-access.log
12 months ago
fi
}
function start_run(){
#运行crond
/usr/sbin/crond
sleep 2
#运行nginx,保持前台运行
/usr/local/nginx/sbin/nginx -g "daemon off;"
#tail -f /data/xcdn/logs/error.log
}
#运行nginx
#create_dir
run_check && start_run