Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/14/21 in all areas

  1. Hi there, If you are doing a windows server deployment for your server and want a method for keeping your server running at all times incase of crashes etc. This also allows you to terminate it externally via another application and it will reboot (ideally if updates are managed by source control) while ($true) { if ((Get-Process -Name ragemp-server -ErrorAction SilentlyContinue) -eq $null) { Write-Host -ForegroundColor Red "Server Is Not Running" Set-Location -Path C:\RageMP\Server-Files $date = Get-Date -Format G write-host -ForegroundColor Green "Guardian Started Headless RageMP Server 1.1 $($date)" ./ragemp-server.exe } else { write-host -ForegroundColor Green "Server Is Running" } Start-Sleep -Seconds 10 } To run and test this - I would recommend starting with: Windows PowerShell ISE. This is a Microsoft tool that allows you to test your scripts before saving them. Save this as a Powershell script ie servermaintain.ps1 If the script is running successfully you will see the logs from the Rage Server directly within the Powershell window. You will just need to create a scheduled task (in Windows) to launch your powershell on boot or login to make sure it is always running (if your server host is restarted)
    2 points
×
×
  • Create New...