diff --git a/modules/billing/docs/rust/index.php b/modules/billing/docs/rust/index.php index 26816d53..bbd2d4e2 100644 --- a/modules/billing/docs/rust/index.php +++ b/modules/billing/docs/rust/index.php @@ -279,6 +279,55 @@ setadminpassword [password] +

Creating a Start Script

+ +

Linux (start.sh):

+
#!/bin/bash
+cd /path/to/server
+./server_executable [parameters] 2>&1 | tee server.log
+
+
chmod +x start.sh
+./start.sh
+
+ +

Windows (start.bat):

+
@echo off
+cd /d "%~dp0"
+server_executable.exe [parameters]
+pause
+
+ +

Running as a Service

+ +

Linux (systemd):

+
# Create service file: /etc/systemd/system/gameserver.service
+[Unit]
+Description=Rust Server
+After=network.target
+
+[Service]
+Type=simple
+User=gameserver
+WorkingDirectory=/home/gameserver/server
+ExecStart=/home/gameserver/server/start.sh
+Restart=on-failure
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
+
+ +
# Enable and start service
+sudo systemctl daemon-reload
+sudo systemctl enable gameserver
+sudo systemctl start gameserver
+sudo systemctl status gameserver
+
+ +

🔧 Troubleshooting

+ +

Server Won't Start

+

Check Server Logs

# View recent log entries
 tail -f server.log
diff --git a/tools/generate_game_docs.py b/tools/generate_game_docs.py
index 31d423d9..4427ac64 100755
--- a/tools/generate_game_docs.py
+++ b/tools/generate_game_docs.py
@@ -623,7 +623,7 @@ setadminpassword [password]
                 default = param.get('default')
                 options = param.get('options', [])
                 
-                # Clean HTML from description - unescape HTML entities and remove tags
+                # Clean HTML from description - unescape HTML entities, remove tags, then re-escape for output
                 if description:
                     description_clean = html.unescape(description)
                     # Remove HTML tags (simple but effective for our use case)
@@ -631,13 +631,18 @@ setadminpassword [password]
                 else:
                     description_clean = "No description available"
                 
+                # Escape all values for HTML output to prevent XSS
+                param_key_escaped = html.escape(param_key, quote=True)
+                caption_escaped = html.escape(caption, quote=True)
+                description_escaped = html.escape(description_clean, quote=True)
+                
                 php_doc += f'''
     

- {param_key} - - {caption} + {param_key_escaped} + - {caption_escaped}

-

{description_clean}

+

{description_escaped}

''' if param_type == 'select' and options: @@ -645,12 +650,15 @@ setadminpassword [password]
    ''' for opt in options: - php_doc += f'''
  • {opt['value']} - {opt['text']}
  • \n''' + opt_value_escaped = html.escape(opt['value'], quote=True) + opt_text_escaped = html.escape(opt['text'], quote=True) + php_doc += f'''
  • {opt_value_escaped} - {opt_text_escaped}
  • \n''' php_doc += '''
''' if default: - php_doc += f'''

Default: {default}

+ default_escaped = html.escape(str(default), quote=True) + php_doc += f'''

Default: {default_escaped}

''' php_doc += '''