Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 3.02 KB

README.agent.en.md

File metadata and controls

97 lines (65 loc) · 3.02 KB

pst-agent deployment

简体中文 | English | 日本語

Linux

This refers to the scenario where your game server is a Linux version, and you want to deploy the pst main body elsewhere. For the deployment of the pst main body, refer to the previous Installation and Deployment. The impact of pst-agent is only on the modification of the configuration file.

Download

Download the pst-agent tool, rename it, and ensure it's executable

# Download and rename
mv pst-agent_v0.9.2_linux_x86_64 pst-agent
chmod +x pst-agent

Run

# ./pst-agent --port 8081 -d {Absolute path of the Level.sav save file}
# For example:
./pst-agent --port 8081 -d /home/lighthouse/game/Saved/

After confirming it's running normally, run it in the background (it will continue to run after closing the ssh window)

# Run in the background and save logs in agent.log
nohup ./pst-agent --port 8081 -d ...{manually omitted}.../Saved > agent.log 2>&1 &
# View the log
tail -f agent.log

Open Firewall/Security Group

If pst-agent and pst main body are not in the same network group, you need to open the corresponding public network port of the game server (such as 8081, or other custom ports)

Configuration

Find the config.yaml file of the pst main body (note, not the pst-agent!!!) and modify it.

You only need to modify save: path

...
save: # Configuration related to save file parsing
  path: "http://{Public IP of the game server}:{port}/sync" # pst-agent service interface
  ...
...

Restart the pst main body to apply changes

Close Background Operation

kill $(ps aux | grep 'pst-agent' | awk '{print $2}') | head -n 1

Windows

This refers to the scenario where your game server is a Windows version, and you want to deploy the pst main body elsewhere. For the deployment of the pst main body, refer to the previous Installation and Deployment. The impact of pst-agent is only on the modification of the configuration file.

Download

Download the pst-agent tool and rename it, e.g., rename pst-agent_v0.9.2_windows_x86_64.exe to pst-agent.exe

Run

Press Win + R, type powershell to open Powershell, use the cd command to navigate to the directory of the downloaded executable

# .\pst-agent.exe --port Access Port -d Save file Level.sav location
.\pst-agent.exe --port 8081 -d C:\Users\ZaiGie\...\Pal\Saved

After successful operation, please keep the window open

Configuration

Find the config.yaml file of the pst main body (note, not the pst-agent!!!) and modify it.

You only need to modify save: path

...
save: # Configuration related to save file parsing
  path: "{http://Public IP of the game server}:{port}/sync" # pst-agent service interface
  ...
...

Restart the pst main body to apply changes