1. When making a thread, please tag your thread accordingly using the menu to the left of the textfield where you name your thread where applicable. Server Advertisements and Mod Releases should be contained to their respective subforums.

Server Help Problem with auto-updater for server

Discussion in 'Multiplayer' started by DarklySteamGear, May 27, 2018.

  1. DarklySteamGear

    DarklySteamGear Big Damn Hero

    So anyways, I wrote this batch file to help with automatically updating a server every 12 hours, because I run a lot of mods on my server, but the problem is, it will not exit out of starbound_server.exe no matter what command I seem to put in. I am a bit stuck, and could use some help. here's the batch code:



    @Echo off
    cd "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\"
    ECHO Starting Server for first time
    taskkill /IM "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\starbound_server.exe" /F
    tskill Powershell
    tskill "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\powershell.ps1"
    tskill starbound_server.exe
    tskill "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\starbound_server.exe"
    del /q "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\mods\*.*"
    Powershell.exe -executionpolicy remotesigned -File "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\powershell.ps1"
    start /b "" "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\starbound_server.exe"
    GOTO START
    :START
    ECHO Starting Server
    ECHO waiting another 12 hours before updating server again
    TIMEOUT 43200
    GOTO UPDATE
    :UPDATE
    ECHO Updating server...
    taskkill /IM "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\starbound_server.exe" /F
    tskill Powershell
    tskill "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\powershell.ps1"
    tskill starbound_server.exe
    tskill "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\starbound_server.exe"
    del /q "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\mods\*.*"
    Powershell.exe -executionpolicy remotesigned -File "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\powershell.ps1"
    start /b "" "C:\Program Files (x86)\Steam\steamapps\common\Starbound Dedicated Server\win64\starbound_server.exe"
    GOTO START
     

Share This Page