packageMonitor.sh 963 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. cur_date="`date +%Y-%m-%d`"
  3. RELEASE_DIR=./release
  4. RELEASE_PACKAGE_OPS=$RELEASE_DIR/ops
  5. mkdir -p $RELEASE_DIR
  6. mkdir -p $RELEASE_PACKAGE_OPS
  7. rm -rf $RELEASE_PACKAGE_OPS
  8. cp -rf ./code/lib $RELEASE_PACKAGE_OPS/
  9. cp -rf ./code/alert $RELEASE_PACKAGE_OPS/
  10. cp -rf ./code/conf $RELEASE_PACKAGE_OPS/
  11. cp -rf ./code/prometheus %RELEASE_PACKAGE_OPS/
  12. cp -rf ./code/*All.sh $RELEASE_PACKAGE_OPS/
  13. cp -rf ./code/dos2unixAll.sh $RELEASE_PACKAGE_OPS/
  14. cp -rf ./code/cleanLogs.sh $RELEASE_PACKAGE_OPS/
  15. cp -rf ./code/run.sh $RELEASE_PACKAGE_OPS/
  16. cp -rf ./code/restart.sh $RELEASE_PACKAGE_OPS/
  17. cp -rf ./code/stop.sh $RELEASE_PACKAGE_OPS/
  18. cp -rf ./code/status.sh $RELEASE_PACKAGE_OPS/
  19. chmod -R +x $RELEASE_PACKAGE_OPS/*.sh
  20. chmod -R +x $RELEASE_PACKAGE_OPS/lib/*
  21. chmod -R +x $RELEASE_PACKAGE_OPS/alert/lib/*
  22. chmod -R +x $RELEASE_PACKAGE_OPS/prometheus/lib/*
  23. mkdir -p $RELEASE_PACKAGE_OPS/log
  24. cd $RELEASE_DIR
  25. tar -zcf ./ops-v${cur_date}.tar.gz ./ops
  26. echo "打包成功"