lgsm local mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
865 B

#!/bin/bash
# LGSM check_system_requirements.sh
# Author: Daniel Gibbs
# Contributor: UltimateByte
# Website: https://gameservermanagers.com
# Description: Checks RAM requirement
mbphysmem=$(free -m | awk '/Mem:/ {print $2}')
# RAM requirement in MegaBytes for each game or engine
if [ "${gamename} == "Rust" ]; then
ramrequirement="4000"
fi
# If the game or engine has a minimum RAM Requirement, compare it to system's available RAM
if [ -n "${ramrequirement}" ]; then
if [ "${mbphysmem}" -lt "${ramrequirement} ]; then
# Warn the user
fn_print_warn "Insufficient physical RAM: ${mbphysmem}MB available for ${ramrequirement}MB required."
echo "You may encounter issues such as server lagging or shutting down unexpectedly."
fn_script_log_warn "Insufficient physical RAM: ${mbphysmem}MB available for ${ramrequirement}MB required."
fi
fi