Forums

Discussions of the easy to use open source game control panel.

You are not logged in.

Announcement

Welcome on board ! We are very proud to present you our forums powered by FluxBB ! Please Register, do not forget to read carefully Forum Rules and feel free to Contact Us if you see any problems. Finally, take part in site life !

#1 2014-09-16 17:37:42

redonkuless
Member
Registered: 2014-09-14
Posts: 4

All anonymous Linux Dedicated Server Prep Script

[== Bash ==]

#############
#!/bin/bash #####################################################################################################################
# Root Required for Dependencies Apt-get Installs.                                                                              #
# This Script setups ALL Valve Linux Dedicated "ANONYMOUS LOGIN" Servers (DOWNLOAD/INSTALL)                                     #
# SUPPORTED OS: Centos 7+ , Ubuntu 14.04+  Others might work however you will need to change dependency versions (apt/yum)      #
# Code written by NRA-Redonkuless                                                                                               #
#                                                                                                                               #
# I will be cleaning up the code and bringing futher automated support to the script.                                           #
# Enjoy!                                                                                                                        #
#                                                                                                                               #
# STEAM: [url]http://steamcommunity.com/id/RatedEC10/home[/url]                                                                 #
# Email: jonathan [at@at] wyomingitsolutions [DoT.DOT] com                                                                      #
#                                                                                                                               #
# I DO NOT TAKE ANY RESPONSIBILITY FOR THIS SCRIPT OR DAMAGES THAT MIGHT HAPPEN IN THE USE OF THIS SCRIPT USE AT YOUR OWN RISK! #
#################################################################################################################################

if [ `id -u` != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi

echo  "Making SteamCMD Directory"

mkdir steamcmd
cd steamcmd/

echo Getting Steam Installer
sleep 4

/usr/bin/wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz

echo Unzipping Steam Installer
sleep 4

zcat -cd steamcmd_linux.tar.gz | tar -xvf -

echo "[Updating Package Manager]"
sleep 6
clear

echo " LIST OF GAME SERVER AND ID'S AVAILABLE:          IDs:
Counter-Strike Dedicated Server                         90
Counter-Strike Global Offensive Dedicated Server        740
Counter-Strike: Condition Zero Dedicated Server         90
Counter-Strike: Source Dedicated Server                 232330
Day of Defeat Dedicated Server                          90
Day of Defeat: Source Dedicated Server                  232290
Deathmatch Classic Dedicated Server                     90
Fistful of Frags Server                                 295230
Garrys Mod Dedicated Server                             4020
Half-Life 2: Deathmatch Dedicated Server                232370
Half-Life Deathmatch: Source Dedicated server           255470
Half-Life Dedicated Server                              90
Half-Life: Opposing Force Server                        90
Insurgency Dedicated Server                             17705
Just Cause 2: Multiplayer - Dedicated Server            261140
Killing Floor Dedicated Server - Linux                  215360
Left 4 Dead 2 Dedicated Server                          222860
Left 4 Dead Dedicated Server                            222840
Pirates, Vikings, and Knights II Dedicated Server       17575
Ricochet Dedicated Server                               90
Source SDK Base 2006 MP Dedicated Server                205
Source 2007 Dedicated Server                            310
Source Dedicated Server                                 205
Source SDK Base 2013 Dedicated Server                   244310
Team Fortress 2 Dedicated Server                        232250
Team Fortress Classic Dedicated Server                  90
Zombie Panic Source Dedicated Server                    17505";
echo "\n";
echo -n "Please enter GameID:"
read gameID;
echo -n "Please Enter a name for your game Example  cssource:"
read foldername;

# Checks to see if you are running 32bit or 64bit OS and installing Dependencies if your running 64
# If we did not do this steam would not be able to install.


#
#
#yum install glibc.i686 libgcc_s.so.1 --setopt=protected_multilib=false
# rpm -qi --whatprovides /etc/redhat-release | awk -F' ' '{print $3}' | grep centos-release
#


ARCH=$(uname -m)

        if [ $ARCH = "x86_64" ]; then
        echo System is 64bit installing dependancies.
if [ -f /etc/debian_version ]; then
    OSpkg=apt
elif [ -f /etc/centos-release ]; then
OSpkg=yum
fi

if [ $OSpkg == "apt" ]; then
        echo "\n\n\n Release Ubuntu 64bit Found Installing dependencies!\n\n\n";
        sleep 6

        apt-get update

        if [ $(dpkg-query -W -f='${Status}' lib32z1 2>/dev/null | grep -c "ok installed") -eq 0 ];
        then
        apt-get install lib32z1;
        else
        echo lib32z1 already installed
        fi

        if [ $(dpkg-query -W -f='${Status}' lib32bz2-1.0 2>/dev/null | grep -c "ok installed") -eq 0 ];
        then
        apt-get install lib32bz2-1.0;
        else
        echo lib32bz2-1.0 already installed or newer version available
        fi

        if [ $(dpkg-query -W -f='${Status}' lib32gcc1 2>/dev/null | grep -c "ok installed") -eq 0 ];
        then
        apt-get install lib32gcc1;
        else
        echo lib32gcc1 is already install or newer version available
        fi

        fi
        if [ $OSpkg == "yum" ]; then
                echo "\n\n\nRelease CentOS Detected Installing Dependencies\n\n\n"
                sleep 6
                        yum install glibc.i686 libgcc_s.so.1 --setopt=protected_multilib=false

        fi

        else
        echo system is 32bit no need for 64bit support
fi
        echo "\n\n\n"
        echo "Downloading GameID:" $gameID "To your system: THIS WILL TAKE A WHILE"
        echo "\n\n\n";
        sleep 4
        ./steamcmd.sh +login anonymous +force_install_dir ../game-server +app_update $gameID +quit
        echo Cleaning up
        sleep 4
        cd ..
        rm -rf steamcmd
        MYdPATH="/home/";
        istrue=1;
        until [ $istrue -eq "0" ]; do
        DirectoryList=$(ls /home);
        echo Home Directory List of users: $DirectoryList
        echo -n "Please enter username of which user you would like to install the server to:"
        read usern
        echo username: $usern
        dirusr=${MYdPATH}${usern}
        echo $dirusr

        if [ -d ${dirusr} ]; then
        echo "\n" "Copying Files To User Directory";
        mv game-server ${dirusr}"/"${foldername}
        chown $usern:$usrn ${MYdPATH}${usern}"/"${foldername} -R
        istrue=0;

        else
        echo "\n" "User path Does not exists: $dirusr"
        fi
        done


        echo ${MYdPATH}${usern}"/"${foldername} " is now the directory for your Dedicated Game. ENJOY!"

Offline

#2 2014-09-17 18:27:06

super_g2
Idea's master ;)
Registered: 2013-05-29
Posts: 116
Website

Re: All anonymous Linux Dedicated Server Prep Script

thks smile
those scripts (including in your previous post/topic) are really great !
Maybe an integration in the built-in game repo system can be observed in next releases of BGP smile

Thks

Offline

#3 2014-09-18 15:41:59

redonkuless
Member
Registered: 2014-09-14
Posts: 4

Re: All anonymous Linux Dedicated Server Prep Script

Thanks, I haven't wrote a script in ages, I will be trying to add auto support for both yum and apt repository so it finds the latest of the dependencies so its more flexible and would support more OS versions.

Offline

#4 2014-09-18 19:39:03

super_g2
Idea's master ;)
Registered: 2013-05-29
Posts: 116
Website

Re: All anonymous Linux Dedicated Server Prep Script

yep smile

Offline

#5 2014-10-12 20:51:58

warhawk
Administrator
From: France
Registered: 2013-05-29
Posts: 256
Website

Re: All anonymous Linux Dedicated Server Prep Script

Thank you !!


It will be very useful for the V2 !!! tongue


Regards

Offline

#6 2014-12-23 02:14:25

Ryouta
Member
Registered: 2014-12-23
Posts: 1

Re: All anonymous Linux Dedicated Server Prep Script

How to use this?

Pls help me wink

Offline

#7 2014-12-26 15:02:45

warhawk
Administrator
From: France
Registered: 2013-05-29
Posts: 256
Website

Re: All anonymous Linux Dedicated Server Prep Script

simply run this script as root, it is a wizard so it will help you during the installation.

Regards :-)

Offline

Board footer

Powered by FluxBB