It will check for game updates, check for workshop updates!
It will automatically pull the mission from github, unzip it and pbo pack it!
Then it will start services!
All you have to do is restart the server or restart the start the service.
We use NSSM for creating services for Arma 3 Server and Arma 3 Headless client's
This powershell script can be lunched via Batch
Code: Select all
@echo off
PowerShell.exe -Command "& 'c:/steam/update.ps1'"
exit
Code: Select all
# Asking Steam if there is any updates to Workshops and also to the Arma 3 Game
Start-Process -FilePath "c:/steam/steamcmd.exe" -ArgumentList "+login useremail password +force_install_dir c:/steam/steamapps/ +workshop_download_item 107410 642000944 +workshop_download_item 107410 497660133 +workshop_download_item 107410 497661914 +workshop_download_item 107410 541888371 +workshop_download_item 107410 450814997 +app_update 233780 validate +quit" -NoNewWindow -Wait
# We want to copy all the Addon Keys to the server keys folder if there is an updated version
copy-item C:\Steam\steamapps\workshop\content\107410\450814997\keys\*.bikey C:\Steam\steamapps\keys\ -force -recurse
copy-item C:\Steam\steamapps\workshop\content\107410\497660133\keys\*.bikey C:\Steam\steamapps\keys\ -force -recurse
copy-item C:\Steam\steamapps\workshop\content\107410\497661914\keys\*.bikey C:\Steam\steamapps\keys\ -force -recurse
copy-item C:\Steam\steamapps\workshop\content\107410\541888371\keys\*.bikey C:\Steam\steamapps\keys\ -force -recurse
copy-item C:\Steam\steamapps\workshop\content\107410\642000944\keys\*.bikey C:\Steam\steamapps\keys\ -force -recurse
# We want to clear up old RPT logs from taking to much space
Remove-Item C:\Steam\steamapps\startup\*.rpt
Remove-Item C:\Steam\steamapps\startup\*.log
# Lets delete old missions from mpmissions folder
Remove-Item C:\Steam\steamapps\mpmissions\*.*
Start-Sleep -s 1
# Downloading New Mission From GitHub
$source = "https://github.com/Liveandletdie/becti_zerty_OFPS_Extended.Altis/archive/Live.zip"
$destination = "C:/Steam/steamapps/mpmissions/Live.zip"
Invoke-WebRequest $source -OutFile $destination
Start-Sleep -s 20
# Unzipping GitHubs Live File
Add-Type -AssemblyName System.IO.Compression.FileSystem
function Unzip
{
param([string]$zipfile, [string]$outpath)
[System.IO.Compression.ZipFile]::ExtractToDirectory($zipfile, $outpath)
}
Unzip "C:\Steam\steamapps\mpmissions\Live.zip" "C:\Steam\steamapps\mpmissions\Live"
Start-Sleep -s 10
# Packing Mission into PBO
Start-Process -FilePath "C:\steam\pbo\pboconsole.exe" -ArgumentList "-pack C:\Steam\steamapps\mpmissions\Live C:\Steam\steamapps\mpmissions\becti_zerty_OFPS_Extended.Altis.pbo"
Start-Sleep -s 10
#Lets Delete the zip file and unzipped folder
Remove-Item C:\Steam\steamapps\mpmissions\Live.zip -force -recurse
Remove-Item C:\Steam\steamapps\mpmissions\Live -force -recurse
Start-Sleep -s 1
start-service "Arma3 Server"
start-service "Arma3 HC2"
start-service "Arma3 HC3"
Exit
Loading mods with -param=file.txt
Code: Select all
-serverMod=startup\monitor
-mod=workshop\content\107410\450814997;workshop\content\107410\497660133;workshop\content\107410\497661914;workshop\content\107410\541888371;workshop\content\107410\642000944;workshop\content\107410\583496184;workshop\content\107410\583544987