VPS侦探论坛

 找回密码
 注册
查看: 4639|回复: 1

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

[复制链接]
发表于 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 [sigspec]
Nginx program is reloding!
Shutting down MySQL SUCCESS!
Starting MySQL. SUCCESS!
Shutting down php_fpm . done
Starting php_fpm  done
[root@li254-XXXX ~]#


/usr/local/nginx/logs/ 下的 nginx.pid 也被一併清除了ㄋ.....
请问该如何處理修正呢?
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-5-18 10:37:10 | 显示全部楼层


不用管,应该是nginx没运行所以没法kill nginx的进程
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 01:28 , Processed in 0.025734 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表