168free 发表于 2012-5-18 00:53:10

求助日志切割脚本自動清除後, 重啟出現錯誤訊息..

我的目的是要切割 /usr/local/nginx/logs/ 下的 access.log
有11GB.....

按照 https://www.vpser.net/manage/cut-nginx-log-files.html
的指示,把cut_nginx_logs.sh 设置好了.


然后把

#set the path to nginx log files
log_files_path="/home/wwwlogs/"
log_files_dir=${log_files_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")
#set the path to nginx.
nginx_sbin="/usr/local/nginx/sbin/nginx"
#Set how long you want to save
save_days=30

修改成
#set the path to nginx log files
log_files_path="/usr/local/nginx/logs/"
log_files_dir=${log_files_path}$(date -d "yesterday" +"%Y")/$(date -d "yesterday" +"%m")
#set the path to nginx.
nginx_sbin="/usr/local/nginx/sbin/nginx"
#Set how long you want to save
save_days=5

保存时间到了, 自动清除...
重启后, 出现错误讯息....

错误讯息如下:
Reload LNMP...
Reload Nginx configure...
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l
Nginx program is reloding!
Shutting down MySQL SUCCESS!
Starting MySQL. SUCCESS!
Shutting down php_fpm . done
Starting php_fpmdone
#


/usr/local/nginx/logs/ 下的 nginx.pid 也被一併清除了ㄋ.....
请问该如何處理修正呢?

licess 发表于 2012-5-18 10:37:10

不用管,应该是nginx没运行所以没法kill nginx的进程
页: [1]
查看完整版本: 求助日志切割脚本自動清除後, 重啟出現錯誤訊息..