5 changed files with 143 additions and 0 deletions
@ -0,0 +1,16 @@ |
|||||
|
#!/bin/bash |
||||
|
# LGSM fn_updateserver function |
||||
|
# Author: Daniel Gibbs |
||||
|
# Website: http://danielgibbs.co.uk |
||||
|
# Version: 011214 |
||||
|
|
||||
|
fn_rootcheck |
||||
|
fn_syscheck |
||||
|
fn_printdots "Updating ${servicename}: ${servername}" |
||||
|
sleep 1 |
||||
|
fn_printok "Updating ${servicename}: ${servername}" |
||||
|
sleep 1 |
||||
|
fn_scriptlog "Updating ${servername}" |
||||
|
cd "${rootdir}" |
||||
|
cd "steamcmd" |
||||
|
./steamcmd.sh +login ${steamuser} "${steampass}" +force_install_dir "${filesdir}" +app_update ${appid} +quit|tee -a "${scriptlog}" |
@ -0,0 +1,33 @@ |
|||||
|
#!/bin/bash |
||||
|
# LGSM fn_ut2k4compressmaps function |
||||
|
# Author: Daniel Gibbs |
||||
|
# Website: http://danielgibbs.co.uk |
||||
|
# Version: 011214 |
||||
|
|
||||
|
fn_rootcheck |
||||
|
clear |
||||
|
echo "${gamename} Map Compressor" |
||||
|
echo "============================" |
||||
|
echo "Will compress all maps in:" |
||||
|
echo "" |
||||
|
pwd |
||||
|
echo "" |
||||
|
echo "Compressed maps saved to:" |
||||
|
echo "" |
||||
|
echo "${compressedmapsdir}" |
||||
|
echo "" |
||||
|
while true; do |
||||
|
read -p "Start compression [y/N]" yn |
||||
|
case $yn in |
||||
|
[Yy]* ) break;; |
||||
|
[Nn]* ) echo Exiting; return 1;; |
||||
|
* ) echo "Please answer yes or no.";; |
||||
|
esac |
||||
|
done |
||||
|
mkdir -pv "${compressedmapsdir}" > /dev/null 2>&1 |
||||
|
rm -rfv "${filesdir}/Maps/*.uz2" |
||||
|
cd "${systemdir}" |
||||
|
for map in `ls "${filesdir}/Maps"`; do |
||||
|
./ucc-bin compress ../Maps/${map} --nohomedir |
||||
|
done |
||||
|
mv -fv "${filesdir}/Maps/*.uz2" "${compressedmapsdir}" |
@ -0,0 +1,54 @@ |
|||||
|
#!/bin/bash |
||||
|
# LGSM fn_ut2k4filesdl function |
||||
|
# Author: Daniel Gibbs |
||||
|
# Website: http://danielgibbs.co.uk |
||||
|
# Version: 011214 |
||||
|
|
||||
|
echo "Downloading Server Files" |
||||
|
echo "=================================" |
||||
|
cd "${rootdir}" |
||||
|
mkdir -pv "${filesdir}" |
||||
|
cd "${filesdir}" |
||||
|
if [ ! -f dedicatedserver3339-bonuspack.zip ]; then |
||||
|
wget -nv -N http://danielgibbs.co.uk/wp-content/uploads/ut2004/dedicatedserver3339-bonuspack.zip |
||||
|
else |
||||
|
echo "dedicatedserver3339-bonuspack.zip already downloaded!" |
||||
|
fi |
||||
|
echo "Running MD5 checksum to verify the file" |
||||
|
sleep 1 |
||||
|
echo "MD5 checksum: d3f28c5245c4c02802d48e4f0ffd3e34" |
||||
|
md5check=$(md5sum dedicatedserver3339-bonuspack.zip|awk '{print $1;}') |
||||
|
echo "File returned: ${md5check}" |
||||
|
if [ "${md5check}" != "d3f28c5245c4c02802d48e4f0ffd3e34" ]; then |
||||
|
echo "MD5 checksum: FAILED!" |
||||
|
read -p "Retry download? [y/N]" yn |
||||
|
case $yn in |
||||
|
[Yy]* ) rm -fv dedicatedserver3339-bonuspack.zip; fn_ut2k4filesdl;; |
||||
|
[Nn]* ) echo Exiting; exit;; |
||||
|
* ) echo "Please answer yes or no.";; |
||||
|
esac |
||||
|
else |
||||
|
echo "MD5 checksum: PASSED" |
||||
|
fi |
||||
|
if [ ! -f ut2004-lnxpatch3369-2.tar.bz2 ]; then |
||||
|
wget -nv -N http://danielgibbs.co.uk/wp-content/uploads/ut2004/ut2004-lnxpatch3369-2.tar.bz2 |
||||
|
else |
||||
|
echo "ut2004-lnxpatch3369-2.tar.bz2 already downloaded!" |
||||
|
fi |
||||
|
echo "Running MD5 checksum to verify the file" |
||||
|
sleep 1 |
||||
|
echo "MD5 checksum: 0fa447e05fe5a38e0e32adf171be405e" |
||||
|
md5check=$(md5sum ut2004-lnxpatch3369-2.tar.bz2|awk '{print $1;}') |
||||
|
echo "File returned: ${md5check}" |
||||
|
if [ "${md5check}" != "0fa447e05fe5a38e0e32adf171be405e" ]; then |
||||
|
echo "MD5 checksum: FAILED!" |
||||
|
read -p "Retry download? [y/N]" yn |
||||
|
case $yn in |
||||
|
[Yy]* ) rm -fv ut2004-lnxpatch3369-2.tar.bz2; fn_ut2k4filesdl;; |
||||
|
[Nn]* ) echo Exiting; exit;; |
||||
|
* ) echo "Please answer yes or no.";; |
||||
|
esac |
||||
|
else |
||||
|
echo "MD5 checksum: PASSED" |
||||
|
fi |
||||
|
echo "" |
@ -0,0 +1,18 @@ |
|||||
|
#!/bin/bash |
||||
|
# LGSM fn_ut2k4key function |
||||
|
# Author: Daniel Gibbs |
||||
|
# Website: http://danielgibbs.co.uk |
||||
|
# Version: 011214 |
||||
|
|
||||
|
echo "Enter ${gamename} CD Key" |
||||
|
echo "=================================" |
||||
|
sleep 1 |
||||
|
echo "To get your server listed on the Master Server list" |
||||
|
echo "you must get a free CD key. Get a key here:" |
||||
|
echo "http://www.unrealtournament.com/ut2004server/cdkey.php" |
||||
|
echo "" |
||||
|
echo "Once you have the key enter it below" |
||||
|
echo -n "KEY: " |
||||
|
read CODE |
||||
|
echo ""\""CDKey"\""="\""${CODE}"\""" > "${systemdir}/cdkey" |
||||
|
echo "" |
@ -0,0 +1,22 @@ |
|||||
|
#!/bin/bash |
||||
|
# LGSM fn_validateserver function |
||||
|
# Author: Daniel Gibbs |
||||
|
# Website: http://danielgibbs.co.uk |
||||
|
# Version: 011214 |
||||
|
|
||||
|
fn_rootcheck |
||||
|
fn_syscheck |
||||
|
fn_printwarn "Validating may overwrite some customised files." |
||||
|
sleep 1 |
||||
|
echo -en "\n" |
||||
|
echo -en "https://developer.valvesoftware.com/wiki/SteamCMD#Validate" |
||||
|
sleep 5 |
||||
|
echo -en "\n" |
||||
|
fn_printdots "Validating ${servicename}: ${servername}" |
||||
|
sleep 1 |
||||
|
fn_printok "Validating ${servicename}: ${servername}" |
||||
|
sleep 1 |
||||
|
fn_scriptlog "Validating ${servername}" |
||||
|
cd "${rootdir}" |
||||
|
cd "steamcmd" |
||||
|
./steamcmd.sh +login ${steamuser} "${steampass}" +force_install_dir "${filesdir}" +app_update ${appid} validate +quit|tee -a "${scriptlog}" |
Loading…
Reference in new issue