custom_realse_shop_start.bat 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. @echo off & setlocal enabledelayedexpansion
  2. ::ipconfig>ip.txt
  3. netstat -aon |findstr :8000>pid.txt
  4. for /f "delims=" %%a in (pid.txt) do (
  5. for /f "tokens=1* delims=:" %%i in ('call echo %%a^|find /i "TCP"') do (
  6. echo %%a
  7. ::��ȡ�����ݹ��˺�,д����һ�����±���
  8. rem Echo %%a>>"text.txt"
  9. )
  10. )
  11. rem ��ȡ�ļ�������
  12. set /P OEM=<pid.txt
  13. rem ��ȡ�ļ��е��ַ���
  14. echo %OEM:~71,76%
  15. taskkill /f /pid %OEM:~71,76%
  16. @echo off
  17. cd D:\server\cwg_crm\custom-service
  18. D:
  19. if not exist D:\server\cwg_crm\backup\custom\%date:~10,4%%date:~4,2%%date:~7,2% md D:\server\cwg_crm\backup\custom\%date:~10,4%%date:~4,2%%date:~7,2%
  20. if exist "D:\server\cwg_crm\custom-service\com-crm-custom-1.0.0.jar" (
  21. copy "D:\server\cwg_crm\custom-service\com-crm-custom-1.0.0.jar" "D:\server\cwg_crm\backup\custom\%date:~10,4%%date:~4,2%%date:~7,2%\com-crm-custom-1.0.0-%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,2%.jar"
  22. del "D:\server\cwg_crm\custom-service\com-crm-custom-1.0.0.jar"
  23. )
  24. if exist "D:\server\cwg_crm\custom-service\dependency\crm-backend-1.0.0.jar" (
  25. copy "D:\server\cwg_crm\custom-service\dependency\crm-backend-1.0.0.jar" "D:\server\cwg_crm\backup\custom\%date:~10,4%%date:~4,2%%date:~7,2%\crm-backend-1.0.0-%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,2%.jar"
  26. del "D:\server\cwg_crm\custom-service\dependency\crm-backend-1.0.0.jar"
  27. )
  28. if exist "D:\server\cwg_crm\custom-service\dependency\crm-login-backend-1.0.0.jar" (
  29. copy "D:\server\cwg_crm\custom-service\dependency\crm-login-backend-1.0.0.jar" "D:\server\cwg_crm\backup\custom\%date:~10,4%%date:~4,2%%date:~7,2%\crm-login-backend-1.0.0-%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,2%.jar"
  30. del "D:\server\cwg_crm\custom-service\dependency\crm-login-backend-1.0.0.jar"
  31. )
  32. if exist "D:\server\cwg_crm\custom-service\dependency\crm-core-1.0.0.jar" (
  33. copy "D:\server\cwg_crm\custom-service\dependency\crm-core-1.0.0.jar" "D:\server\cwg_crm\backup\custom\%date:~10,4%%date:~4,2%%date:~7,2%\crm-core-1.0.0-%date:~10,4%%date:~4,2%%date:~7,2%%time:~0,2%%time:~3,2%%time:~6,2%.jar"
  34. del "D:\server\cwg_crm\custom-service\dependency\crm-core-1.0.0.jar"
  35. )
  36. cd "C:\Users\Administrator\crm\crm-custom"
  37. copy "C:\Users\Administrator\crm\crm-custom\com-crm-custom-1.0.0.jar" "D:\server\cwg_crm\custom-service\com-crm-custom-1.0.0.jar"
  38. copy "C:\Users\Administrator\crm\crm-custom\dependency\crm-backend-1.0.0.jar" "D:\server\cwg_crm\custom-service\dependency\crm-backend-1.0.0.jar"
  39. copy "C:\Users\Administrator\crm\crm-custom\dependency\crm-login-backend-1.0.0.jar" "D:\server\cwg_crm\custom-service\dependency\crm-login-backend-1.0.0.jar"
  40. copy "C:\Users\Administrator\crm\crm-custom\dependency\crm-core-1.0.0.jar" "D:\server\cwg_crm\custom-service\dependency\crm-core-1.0.0.jar"
  41. cd "D:\server\cwg_crm\custom-service"
  42. D:
  43. title crm-custom
  44. javaw -Xmx4096m -Dloader.path=dependency -jar com-crm-custom-1.0.0.jar --spring.profiles.active=prod
  45. echo good bye