SA-MP is a free Massively Multiplayer Online game mod for the PC version of Rockstar Games Grand Theft Auto: San Andreas (tm).
The SA:MP GTA San Andreas dedicated server
Name | Tag |
---|---|
Samp | ghcr.io/ptero-eggs/games:samp |
Name | Description | Environment Variable | Default Value | User Viewable | User Editable |
---|---|---|---|---|---|
Version | Example: if the download url is https://sampcenter.com/download/server/linux/0.3.7.tar.gz then the variable should be: `0.3.7` | Version | 0.3.7 | Yes | Yes |
Rcon password | The password used for rcon | RCON_PASS | Yes | Yes |
#!/bin/bash
# Check if VERSION is set and starts with an uppercase "R"
if [[ -n "$VERSION" && "$VERSION" == R* ]]; then
VERSION="0.3.7"
echo "Updated VERSION: $VERSION"
fi
cd /tmp || exit
echo "running: curl -sSL -o samp.tar.gz https://sampcenter.com/download/server/linux/${VERSION}.tar.gz"
curl -sSL -o samp.tar.gz https://sampcenter.com/download/server/linux/${VERSION}.tar.gz
mkdir -p /mnt/server
tar -xzvf samp.tar.gz --strip-components=1 -C /mnt/server/
cd /mnt/server || exit
sed -i '3d' /mnt/server/server.cfg
echo "rcon_password ${RCON_PASS}" >> /mnt/server/server.cfg
chown -R root:root /mnt
export HOME=/mnt/server
## install end
echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------"