Максимальная производительность для ваших игровых серверов!
Заказать сейчаса если нету у меня lgsm и не могу поставить, что в таком случае?В LGSM есть автообновление сервера и оксид.
а если нету у меня lgsm и не могу поставить, что в таком случае?
#!/bin/bash
# Verify that the repository information is correct before running this script.
# Failure to do so can result in a compromised server.
# Only ever download and run software that you know and trust.
# const definitions
LOCAL_VERSION_FILE='oxide_version.txt'
LOCAL_RUST_DIRECTORY="$HOME/.steam/steamapps/common/rust_dedicated"
REPO_URL='https://github.com/OxideMod/Oxide.Rust/' # MUST LINK TO THE REPOSITORY. NOTHING ELSE.
FILENAME='Oxide.Rust-linux.zip'
STEAMAPP_ID='258550' # rust server app ID
# create empty file to store file version (if one doesn't exist)
touch "$LOCAL_VERSION_FILE"
# var initialization
latest_version="$(curl -LIs "${REPO_URL}/releases/latest" | dos2unix | grep -i '^location:' | cut -d' ' -f2 | cut -d'/' -f8)" # Github.com outputs CRLF we run dos2unix to remove them.
local_version="$(<"$LOCAL_VERSION_FILE")"
echo "Download URL is: ${REPO_URL}releases/download/${latest_version}/${FILENAME}"
# check if local version of package matches latest on github
if [ "$latest_version" != "$local_version" ]; then
if curl -Ls "${REPO_URL}releases/download/${latest_version}/${FILENAME}" -o "${FILENAME}"; then
echo "Downloaded ${FILENAME} Successfully."
else
echo "Failed with CURL error: ${?}"
fi
fi
# steam update for whichever steamapp ID you provide. If it says something about SDL ignore it.
steamcmd +login anonymous +app_update "$STEAMAPP_ID" validate +quit && echo "Steam finished updating successfully!" || echo "Failed with steamcmd exit code ${?}"
# overwrite RustDedicated_Data with the latest Oxide files.
unzip -o "${FILENAME}" -d "${LOCAL_RUST_DIRECTORY}" && echo "$latest_version" > "$LOCAL_VERSION_FILE" || echo "Unzip failed with code ${?}. Oxide not installed properly."
echo "Finished updating."