Created
March 11, 2020 12:12
-
-
Save ringvold/90733fa258c271ed6b5d9deaa5456813 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dpkg --add-architecture i386; sudo apt update; sudo apt install mailutils postfix curl wget file tar bzip2 gzip unzip bsdmainutils python util-linux ca-certificates binutils bc jq tmux lib32gcc1 libstdc++6 libstdc++6:i386 | |
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh csgoserver | |
./csgoserver auto-install | |
echo "This script uses these environment variables \n that are to be set by the user: " | |
echo "- LGSM_SERVER_IP" | |
echo "- RCON_PASSWORD" | |
echo "- GSLT_TOKEN" | |
echo "- CSGO_SERVER_PASSWORD" | |
read -p "Have you set these variables? " -n 1 -r | |
echo # (optional) move to a new line | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
export LGSM_INSTANCE_CONFIG_FOLDER=/home/csgoserver/lgsm/config-lgsm/csgoserver | |
export LGSM_INSTANCE_CONFIG=$LGSM_INSTANCE_CONFIG_FOLDER/csgoserver.cfg | |
export GAMESERVER_CONFIG_FOLDER=/home/csgoserver/serverfiles/csgo/cfg/ | |
export GAMESERVER_CONFIG=$GAMESERVER_CONFIG_FOLDER/csgoserver.cfg | |
cat $LGSM_INSTANCE_CONFIG_FOLDER/_default.cfg >> $LGSM_INSTANCE_CONFIG | |
echo "Changing default LGSM instance config" | |
echo " - Setting GSLT Token" | |
sed -i -e "/^gslt=/s/^.*$/gslt=\"$GSLT_TOKEN\"/" $LGSM_INSTANCE_CONFIG | |
echo " - Setting competitive gamemode" | |
sed -i -e "/^gamemode=/s/^.*$/gamemode=\"1\"/" $LGSM_INSTANCE_CONFIG | |
echo " - Setting IP address" | |
sed -i -e "/^ip=/s/^.*$/ip=\"$LGSM_SERVER_IP\"/" $LGSM_INSTANCE_CONFIG | |
echo " - Setting 128 tick rate" | |
sed -i -e "/^tickrate=/s/^.*$/tickrate=\"128\"/" $LGSM_INSTANCE_CONFIG | |
echo "Changing CSGO server config" | |
echo " - Setting server name" | |
sed -i -e "/^hostname/s/^.*$/hostname \"The Promised LAN\"/" $GAMESERVER_CONFIG | |
echo " - Setting rcon password" | |
sed -i -e "/^rcon_password/s/^.*$/rcon_password \"$RCON_PASSWORD\"/" $GAMESERVER_CONFIG | |
echo " - Setting server name" | |
sed -i -e "/^sv_password/s/^.*$/sv_password \"$CSGO_SERVER_PASSWORD\"/" $GAMESERVER_CONFIG | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment