run.sh 406 B

123456789101112
  1. #!/bin/sh
  2. #获取前一天的日期
  3. date=`date -d "yesterday" +%Y_%m_%d`
  4. #复制原始nohup.out到备份目录,并以前一天的日期进行命名
  5. cp /bzd/project/Cold_Api6200/logs/nohup.out /bzd/project/Cold_Api6200/logs/$date.out
  6. #清空原始nohup.out中的内容
  7. cat /dev/null > /bzd/project/Cold_Api6200/logs/nohup.out
  8. export GO111MODULE=off
  9. nohup ./Cold_Api6200 >> ./logs/nohup.out 2>&1 &