Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- :: Based off of Server Launch Script by r4z0r49
- :: Script Modified and for PBO rotation by: Snow - www.armageddongameservers.com
- ::
- :: Usage: rotates PBO's automatically so you can drop your new file in a folder and when the server restarts it will update
- ::Suggest - BEC -BattleEye Extended Controls - http://ibattle.org/
- ::Suggest - Run this with your batch file that starts your servers <--- personal suggestion!!!!
- ::Run Setup.bat First
- :::::::::::::: CONFIG ::::::::::::::::::
- :settings
- :: Set your Arma2AO Base installation directory. LEAVE OFF THE ENDING \
- set serverdir=
- :: Set the name of the folder that contains your HiveExt,config.cfg,BattleEye etc
- set profname=
- :: Set the name of your mission and server files . LEAVE OFF THE .PBO
- set misname=
- set sername=
- ::==========================================================================================================================================================================
- ::Set the name of the folder that contains your server pbo
- set servpbodir=
- ::==========================================================================================================================================================================
- ::======================================================DO NOT TOUCH ANYTHING BELLOW THIS LINE==========================================================
- ::==========================================================================================================================================================================
- ::==========================================================================================================================================================================
- set newmissionbay=new_bay\mission
- set newserverbay=new_bay\server
- ::==========================================================================================================================================================================
- set oldmissionbay=old_bay\mission
- set oldserverbay=old_bay\server
- ::==========================================================================================================================================================================
- :: Delete Original log files after they have been rotated? This keeps your logs more organized and saves space.
- :: 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
- set deloriglogs=1
- ::==========================================================================================================================================================================
- ::==========================================================================================================================================================================
- ::==========================================================================================================================================================================
- TITLE DayZ Simple PBO rotate tool
- :: Set Debug Mode
- set debug=0
- :: Set Debug Timeout in seconds
- set dbsecs=10
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- ::::::::::::::::::::::::::: STOP EDITING ::::::::::::::::::::::::::::::::::::::
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Display Debug output
- if %debug% == 1 (
- timeout %dbsecs%
- )
- :: Set Time and Date
- SET HOUR=%time:~0,2%
- SET dtStamp9=%date:~-4%%date:~4,2%%date:~7,2%_0%time:~1,1%%time:~3,2%_%time:~6,2%
- SET dtStamp24=%date:~-4%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%_%time:~6,2%
- ::Make Date Stamp
- if "%HOUR:~0,1%" == " " (SET dtStamp=%dtStamp9%) else (SET dtStamp=%dtStamp24%)
- ECHO Todays Date and time (%date%)(%time%) / %dtStamp%
- if %debug% == 1 (
- timeout %dbsecs%
- )
- echo (%date%) (%time%) Starting PBO Rotation.
- :Start
- echo making directorys
- timeout 3
- :: Make the Rotated PBO Directorys
- if exist "%serverdir%\%profname%\%newmissionbay%\%misname%.pbo" (
- mkdir "%serverdir%\%profname%\%oldmissionbay%\%dtStamp%"
- move "%serverdir%\MPMissions\%misname%.pbo" "%serverdir%\%profname%\%oldmissionbay%\%dtStamp%\%misname%.pbo"
- echo updating mission
- timeout 1
- move "%serverdir%\%profname%\%newmissionbay%\%misname%.pbo" "%serverdir%\MPMissions\%misname%.pbo"
- )
- if exist "%serverdir%\%profname%\%newserverbay%\%sername%.pbo" (
- mkdir "%serverdir%\%profname%\%oldserverbay%\%dtStamp%"
- move "%serverdir%\%servpbodir%\addons\%sername%.pbo" "%serverdir%\%profname%\%oldserverbay%\%dtStamp%\%sername%.pbo"
- echo updating server file
- timeout 1
- move "%serverdir%\%profname%\%newserverbay%\%sername%.pbo" "%serverdir%\%servpbodir%\addons\%sername%.pbo"
- )
- if %debug% == 1 (
- timeout %dbsecs%
- )
- :: We're done here.
- exit
Advertisement
Add Comment
Please, Sign In to add comment