Browse Source

renamed function

pull/597/head
Daniel Gibbs 9 years ago
parent
commit
dbc0832894
  1. 8
      functions/fix_arma3.sh
  2. 20
      functions/fix_csgo.sh
  3. 24
      functions/fix_steamcmd.sh

8
functions/fix_arma3.sh

@ -6,7 +6,7 @@ lgsm_version="301215"
# Fixes line 63: 20150 Segmentation fault (core dumped) #488 # Fixes line 63: 20150 Segmentation fault (core dumped) #488
fn_fix_steamcmd_msg_start(){ fn_msg_start(){
fn_printdots "Applying ${fixname} fix: ${gamename}" fn_printdots "Applying ${fixname} fix: ${gamename}"
sleep 1 sleep 1
fn_printinfo "Applying ${fixname} fix: ${gamename}" fn_printinfo "Applying ${fixname} fix: ${gamename}"
@ -14,7 +14,7 @@ fn_fix_steamcmd_msg_start(){
sleep 1 sleep 1
} }
fn_fix_steamcmd_msg_end(){ fn_msg_end(){
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
fn_printfailnl "Applying ${fixname} fix: ${gamename}" fn_printfailnl "Applying ${fixname} fix: ${gamename}"
fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}" fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}"
@ -27,7 +27,7 @@ fn_fix_steamcmd_msg_end(){
# Fixes: server not always creating steam_appid.txt file. # Fixes: server not always creating steam_appid.txt file.
if [ -d "${rootdir}/.local/share/Arma\ 3" ]; then if [ -d "${rootdir}/.local/share/Arma\ 3" ]; then
local fixname="20150 Segmentation fault (core dumped)" local fixname="20150 Segmentation fault (core dumped)"
fn_fix_steamcmd_msg_start fn_msg_start
mkdir -p "${rootdir}/.local/share/Arma\ 3" mkdir -p "${rootdir}/.local/share/Arma\ 3"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi

20
functions/fix_csgo.sh

@ -6,7 +6,7 @@ lgsm_version="301215"
# Description: Resolves various issues with csgo. # Description: Resolves various issues with csgo.
fn_fix_steamcmd_msg_start(){ fn_msg_start(){
fn_printdots "Applying ${fixname} fix: ${gamename}" fn_printdots "Applying ${fixname} fix: ${gamename}"
sleep 1 sleep 1
fn_printinfo "Applying ${fixname} fix: ${gamename}" fn_printinfo "Applying ${fixname} fix: ${gamename}"
@ -14,7 +14,7 @@ fn_fix_steamcmd_msg_start(){
sleep 1 sleep 1
} }
fn_fix_steamcmd_msg_end(){ fn_msg_end(){
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
fn_printfailnl "Applying ${fixname} fix: ${gamename}" fn_printfailnl "Applying ${fixname} fix: ${gamename}"
fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}" fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}"
@ -27,35 +27,35 @@ fn_fix_steamcmd_msg_end(){
# Fixes: server not always creating steam_appid.txt file. # Fixes: server not always creating steam_appid.txt file.
if [ ! -f "${filesdir}/steam_appid.txt" ]; then if [ ! -f "${filesdir}/steam_appid.txt" ]; then
local fixname="730 steam_appid.txt" local fixname="730 steam_appid.txt"
fn_fix_steamcmd_msg_start fn_msg_start
echo -n "730" >> "${filesdir}/steam_appid.txt" echo -n "730" >> "${filesdir}/steam_appid.txt"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
# Fixes: Error parsing BotProfile.db - unknown attribute 'Rank'". # Fixes: Error parsing BotProfile.db - unknown attribute 'Rank'".
if ! grep -q "//Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then if ! grep -q "//Rank" "${systemdir}/botprofile.db" > /dev/null 2>&1; then
local fixname="botprofile.db" local fixname="botprofile.db"
fn_fix_steamcmd_msg_start fn_msg_start
sed -i 's/\tRank/\t\/\/Rank/g' "${systemdir}/botprofile.db" > /dev/null 2>&1 sed -i 's/\tRank/\t\/\/Rank/g' "${systemdir}/botprofile.db" > /dev/null 2>&1
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
# Fixes: Unknown command "cl_bobamt_vert". # Fixes: Unknown command "cl_bobamt_vert".
if ! grep -q "//exec default" "${servercfgdir}/valve.rc" > /dev/null 2>&1 || ! grep -q "//exec joystick" "${servercfgdir}/valve.rc" > /dev/null 2>&1; then if ! grep -q "//exec default" "${servercfgdir}/valve.rc" > /dev/null 2>&1 || ! grep -q "//exec joystick" "${servercfgdir}/valve.rc" > /dev/null 2>&1; then
local fixname="valve.rc" local fixname="valve.rc"
fn_fix_steamcmd_msg_start fn_msg_start
sed -i 's/exec default.cfg/\/\/exec default.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 sed -i 's/exec default.cfg/\/\/exec default.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
sed -i 's/exec joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1 sed -i 's/exec joystick.cfg/\/\/exec joystick.cfg/g' "${servercfgdir}/valve.rc" > /dev/null 2>&1
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
# Fixes: workshop map issue. # Fixes: workshop map issue.
# http://forums.steampowered.com/forums/showthread.php?t=3170366. # http://forums.steampowered.com/forums/showthread.php?t=3170366.
if [ -f "${systemdir}/subscribed_collection_ids.txt" ]||[ -f "${systemdir}/subscribed_file_ids.txt" ]||[ -f "${systemdir}/ugc_collection_cache.txt" ]; then if [ -f "${systemdir}/subscribed_collection_ids.txt" ]||[ -f "${systemdir}/subscribed_file_ids.txt" ]||[ -f "${systemdir}/ugc_collection_cache.txt" ]; then
local fixname="workshop map" local fixname="workshop map"
fn_fix_steamcmd_msg_start fn_msg_start
rm -f "${systemdir}/subscribed_collection_ids.txt" rm -f "${systemdir}/subscribed_collection_ids.txt"
rm -f "${systemdir}/subscribed_file_ids.txt" rm -f "${systemdir}/subscribed_file_ids.txt"
rm -f "${systemdir}/ugc_collection_cache.txt" rm -f "${systemdir}/ugc_collection_cache.txt"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi

24
functions/fix_steamcmd.sh

@ -6,7 +6,7 @@ lgsm_version="301215"
# Description: fixes various issues related to steamCMD. # Description: fixes various issues related to steamCMD.
fn_fix_steamcmd_msg_start(){ fn_msg_start(){
fn_printdots "Applying ${fixname} fix: ${gamename}" fn_printdots "Applying ${fixname} fix: ${gamename}"
sleep 1 sleep 1
fn_printinfo "Applying ${fixname} fix: ${gamename}" fn_printinfo "Applying ${fixname} fix: ${gamename}"
@ -14,7 +14,7 @@ fn_fix_steamcmd_msg_start(){
sleep 1 sleep 1
} }
fn_fix_steamcmd_msg_end(){ fn_msg_end(){
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
fn_printfailnl "Applying ${fixname} fix: ${gamename}" fn_printfailnl "Applying ${fixname} fix: ${gamename}"
fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}" fn_scriptlog "Failure! Applying ${fixname} fix: ${gamename}"
@ -28,43 +28,43 @@ fn_fix_steamcmd_msg_end(){
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so. # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam,or a local steamclient.so.
if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then if [ ! -f "${HOME}/.steam/sdk32/steamclient.so" ]; then
local fixname="steamclient.so general" local fixname="steamclient.so general"
fn_fix_steamcmd_msg_start fn_msg_start
mkdir -pv "${HOME}/.steam/sdk32" >> "${scriptlog}" mkdir -pv "${HOME}/.steam/sdk32" >> "${scriptlog}"
cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${scriptlog}" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${HOME}/.steam/sdk32/steamclient.so" >> "${scriptlog}"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
if [ "${gamename}" == "Garry's Mod" ]; then if [ "${gamename}" == "Garry's Mod" ]; then
# Fixes: .steam/sdk32/libsteam.so: cannot open shared object file: No such file or directory # Fixes: .steam/sdk32/libsteam.so: cannot open shared object file: No such file or directory
if [ ! -f "${HOME}/.steam/sdk32/libsteam.so" ]; then if [ ! -f "${HOME}/.steam/sdk32/libsteam.so" ]; then
local fixname="libsteam.so" local fixname="libsteam.so"
fn_fix_steamcmd_msg_start fn_msg_start
mkdir -pv "${HOME}/.steam/sdk32" >> "${scriptlog}" mkdir -pv "${HOME}/.steam/sdk32" >> "${scriptlog}"
cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so" >> "${scriptlog}" cp -v "${filesdir}/bin/libsteam.so" "${HOME}/.steam/sdk32/libsteam.so" >> "${scriptlog}"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then elif [ "${gamename}" == "Serious Sam 3: BFE" ]; then
# Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory # Fixes: .steam/bin32/libsteam.so: cannot open shared object file: No such file or directory
if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then if [ ! -f "${HOME}/.steam/bin32/libsteam.so" ]; then
local fixname="libsteam.so" local fixname="libsteam.so"
fn_fix_steamcmd_msg_start fn_msg_start
mkdir -pv "${HOME}/.steam/bin32" >> "${scriptlog}" mkdir -pv "${HOME}/.steam/bin32" >> "${scriptlog}"
cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${scriptlog}" cp -v "${filesdir}/Bin/libsteam.so" "${HOME}/.steam/bin32/libsteam.so" >> "${scriptlog}"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
elif [ "${gamename}" == "Hurtworld" ]; then elif [ "${gamename}" == "Hurtworld" ]; then
# Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so. # Fixes: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so.
if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" ]; then
local fixname="steamclient.so x86" local fixname="steamclient.so x86"
fn_fix_steamcmd_msg_start fn_msg_start
cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86/steamclient.so" >> "${scriptlog}"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then if [ ! -f "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" ]; then
local fixname="steamclient.so x86_64" local fixname="steamclient.so x86_64"
fn_fix_steamcmd_msg_start fn_msg_start
cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}" cp -v "${rootdir}/steamcmd/linux32/steamclient.so" "${filesdir}/Hurtworld_Data/Plugins/x86_64/steamclient.so" >> "${scriptlog}"
fn_fix_steamcmd_msg_end fn_msg_end
fi fi
fi fi

Loading…
Cancel
Save