修改关键字配置失效时,关联的已失效的配置再次失效的bug

增加分割删除nginx access.log的脚本
志总量,登陆用户名密码提示国际化文件修改
张微's avatar
修改proxy帮助文档,配置操作日志,增加音视频样例剪切工具下载
修正特定服务ajax动态新增的时候没有将编译ID获取的bug
This commit is contained in:
段冬梅
2018-12-14 11:53:41 +08:00
parent ab29865c3f
commit 73bfd7de5f
21 changed files with 151 additions and 16 deletions

View File

@@ -0,0 +1,6 @@
#!/bin/sh
tomcat_install_dir=/home/ceiec/webTomcat
find $tomcat_install_dir/logs/ -mtime +30 -name "*.log" -exec rm -rf {} \;
find $tomcat_install_dir/logs/ -mtime +30 -name "*.txt" -exec rm -rf {} \;
find $tomcat_install_dir/logs/ -mtime +30 -name "*catalina.out.*" -exec rm -rf {} \;
find $tomcat_install_dir/webapps/ntc/WEB-INF/log/ -mtime +30 -name "*.log" -exec rm -rf {} \;

View File

@@ -0,0 +1,29 @@
#!/bin/bash
#function:cut nginx log files
#set the path to nginx log files
log_files_path="/home/ceiec/nginx/logs/"
log_files_dir=${log_files_path}
#set nginx log files you want to cut
log_files_name=(access )
#set the path to nginx.
nginx_sbin="/home/ceiec/nginx/sbin/nginx"
#Set how long you want to save
save_days=30
############################################
#Please do not modify the following script #
############################################
#mkdir -p $log_files_dir
log_files_num=${#log_files_name[@]}
#cut nginx log files
for((i=0;i<$log_files_num;i++));do
mv ${log_files_path}${log_files_name[i]}.log ${log_files_dir}${log_files_name[i]}.log_$(date -d "yesterday" +"%Y-%m-%d")
done
#delete 30 days ago nginx log files
find $log_files_path -mtime +$save_days -exec rm -rf {} \;
#restart nginx
#$nginx_sbin -s reload
systemctl restart nginx

View File

@@ -0,0 +1,8 @@
crontab -e
00 00 * * * /bin/sh /home/ceiec/nginx/sbin/cut_nginx_logs.sh
0 1 * * * /home/ceiec/webTomcat/bin/splitCatalinaOut.sh >/dev/null 2>&1
0 2 * * * /home/ceiec/webTomcat/bin/auto_del_file.sh >/dev/null 2>&1
/etc/rc.d/rc.local
ng_daemon.sh
redis_daemon.sh
servieDaemon.sh

View File

@@ -0,0 +1,11 @@
#! /bin/bash
nginxPath=/usr/local/nginx
pidFile=$nginxPath/logs/nginx.pid
logPath=$nginxPath/logs/daemon.log
while true;do
if [ ! -f $pidFile ]; then
echo "时间:`date '+%Y-%m-%d %T'` nginx进程不存在,开始启动nginx" >> $logPath
systemctl start nginx
fi
sleep 60
done

View File

@@ -0,0 +1,11 @@
#! /bin/bash
redisPath=/home/ceiec/redis/instances/6379
pidFile=$redisPath/redis.pid
logPath=$redisPath/log/daemon.log
while true;do
if [ ! -f $pidFile ]; then
echo "时间:`date '+%Y-%m-%d %T'` redis进程不存在,开始启动redis" >> $logPath
systemctl start redis
fi
sleep 5
done

View File

@@ -0,0 +1,22 @@
#!/bin/bash
##tomcat安装位置
tomcatPath=/home/ceiec/webTomcat
#tomcatPath=/opt/mesasoft/tomcat
##下面的不要改了,默认即可
tomcatProcess=$tomcatPath/bin/bootstrap.jar
tomcatName=$tomcatPath
logPath=$tomcatPath/logs/daemon.log
echo $logPath
while true;do
count=`ps -ef|grep ${tomcatProcess} |grep -v grep`
if [ $? -ne 0 ]
then
echo "时间:`date '+%Y-%m-%d %T'` "$tomcatName"进程不存在,开始启动"$tomcatName >> $logPath
rm -rf $tomcatPath/work
nohup $tomcatPath/bin/startup.sh &
else
echo "时间:`date '+%Y-%m-%d %T'` "$tomcatName"进程存在" >> $logPath
fi
sleep 60
done

View File

@@ -0,0 +1,12 @@
#!/bin/bash
# split catalina.out by day
cd `dirname $0`
d=`date +%Y%m%d`
d1=`date -d'1 day ago' +%Y%m%d`
d7=`date -d'7 day ago' +%Y%m%d`
d30=`date -d'30 day ago' +%Y%m%d`
cd ../logs/
cp catalina.out catalina.out.${d1}
echo "" > catalina.out
rm -rf catalina.out.${d30}