choppra

PBO Rotation

Dec 2nd, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 4.72 KB | None | 0 0
  1. @echo off
  2. :: Based off of Server Launch Script by r4z0r49
  3. :: Script Modified and for PBO rotation by: Snow - www.armageddongameservers.com
  4. ::
  5. :: Usage: rotates PBO's automatically so you can drop your new file in a folder and when the server restarts it will update
  6. ::Suggest - BEC -BattleEye Extended Controls - http://ibattle.org/
  7. ::Suggest -  Run this with your batch file that starts your servers  <--- personal suggestion!!!!
  8. ::Run Setup.bat First
  9.  
  10. :::::::::::::: CONFIG ::::::::::::::::::
  11. :settings
  12. :: Set your Arma2AO Base installation directory. LEAVE OFF THE ENDING \
  13. set serverdir=
  14. :: Set the name of the folder that contains your HiveExt,config.cfg,BattleEye etc
  15. set profname=
  16. :: Set the name of your mission and server files . LEAVE OFF THE .PBO
  17. set misname=
  18. set sername=
  19. ::==========================================================================================================================================================================
  20. ::Set the name of the folder that contains your server pbo
  21. set servpbodir=
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31. ::==========================================================================================================================================================================
  32. ::======================================================DO NOT TOUCH ANYTHING BELLOW THIS LINE==========================================================
  33. ::==========================================================================================================================================================================
  34. ::==========================================================================================================================================================================
  35. set newmissionbay=new_bay\mission
  36. set newserverbay=new_bay\server
  37. ::==========================================================================================================================================================================
  38. set oldmissionbay=old_bay\mission
  39. set oldserverbay=old_bay\server
  40. ::==========================================================================================================================================================================
  41.  
  42.  
  43.  
  44. :: Delete Original log files after they have been rotated? This keeps your logs more organized and saves space.
  45. :: This will not work unless the server is stopped first. This option works best set to 1 when using FireDaemon's Pre/Post Service tab
  46. set deloriglogs=1
  47. ::==========================================================================================================================================================================
  48. ::==========================================================================================================================================================================
  49. ::==========================================================================================================================================================================
  50. TITLE  DayZ Simple PBO rotate tool
  51.  
  52. :: Set Debug Mode
  53. set debug=0
  54. :: Set Debug Timeout in seconds
  55. set dbsecs=10
  56.  
  57. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  58. :::::::::::::::::::::::::::  STOP EDITING ::::::::::::::::::::::::::::::::::::::
  59. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  60.  
  61. :: Display Debug output
  62. if %debug% == 1 (
  63. timeout %dbsecs%
  64. )
  65.  
  66. :: Set Time and Date
  67. SET HOUR=%time:~0,2%
  68. SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%_%time:~6,2%
  69. SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%_%time:~6,2%
  70. ::Make Date Stamp
  71. if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
  72. ECHO Todays Date and time (%date%)(%time%) / %dtStamp%
  73. if %debug% == 1 (
  74. timeout %dbsecs%
  75. )
  76.  
  77. echo (%date%) (%time%) Starting PBO Rotation.
  78.  
  79. :Start
  80. echo making directorys
  81. timeout 3
  82. :: Make the Rotated PBO Directorys
  83. if exist "%serverdir%\%profname%\%newmissionbay%\%misname%.pbo" (
  84. mkdir "%serverdir%\%profname%\%oldmissionbay%\%dtStamp%"
  85. move  "%serverdir%\MPMissions\%misname%.pbo" "%serverdir%\%profname%\%oldmissionbay%\%dtStamp%\%misname%.pbo"
  86. echo updating mission
  87. timeout 1
  88. move  "%serverdir%\%profname%\%newmissionbay%\%misname%.pbo" "%serverdir%\MPMissions\%misname%.pbo"
  89. )
  90.  
  91. if exist "%serverdir%\%profname%\%newserverbay%\%sername%.pbo" (
  92. mkdir "%serverdir%\%profname%\%oldserverbay%\%dtStamp%"
  93. move  "%serverdir%\%servpbodir%\addons\%sername%.pbo" "%serverdir%\%profname%\%oldserverbay%\%dtStamp%\%sername%.pbo"
  94. echo updating server file
  95. timeout 1
  96. move  "%serverdir%\%profname%\%newserverbay%\%sername%.pbo" "%serverdir%\%servpbodir%\addons\%sername%.pbo"
  97. )
  98.  
  99. if %debug% == 1 (
  100. timeout %dbsecs%
  101. )
  102.  
  103. :: We're done here.
  104. exit
Advertisement
Add Comment
Please, Sign In to add comment