Skip to content

Commit

Permalink
fix(arkserver): allow auto selecting of correct steamapps dir (#2781)
Browse files Browse the repository at this point in the history
* fix: correct error with fn_print_error_eol_nl

* fix(arkserver): allow selecting of correct steamapps dir

* added else

* fix(arkserver): allow selecting of correct steamapps dir

steamcmd has two directorys for steamapps based on unknown reasons. fix now allows LinuxGSM to select which ever one is available

* now uses find to locate steamapps dir

* bug
  • Loading branch information
dgibbs64 committed Mar 24, 2020
1 parent 3ae32af commit 420f4a5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lgsm/functions/fix_ark.sh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
# Website: https://linuxgsm.com # Website: https://linuxgsm.com
# Description: Resolves various issues with ARK: Survival Evolved. # Description: Resolves various issues with ARK: Survival Evolved.


# Steam mods directory selecter
# This allows LinxuGSM to select either ~/.steam or ~/Steam. depending on what is being used

steamappsfile=$(find ${HOME} -name appworkshop_346110.acf)
steamappsdir=$(dirname "${steamappsfile}")
steamappspath=$(cd ${steamappsdir};cd ../;pwd)

# removes the symlink if exists. # removes the symlink if exists.
# fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd # fixes issue with older versions of LinuxGSM linking to /home/arkserver/steamcmd
if [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then if [ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]; then
Expand All @@ -24,7 +31,7 @@ if [ ! -f "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamcmd.sh"
fi fi


# if the steamapps symlink is incorrect unlink it. # if the steamapps symlink is incorrect unlink it.
if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)" != "${HOME}/Steam/steamapps" ]; then if [ -d "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux" ]&&[ -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]&&[ "$(readlink ${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps)" != "${steamappspath}" ]; then
fixname="incorrect steamapps symlink" fixname="incorrect steamapps symlink"
fn_fix_msg_start fn_fix_msg_start
unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" unlink "${serverfiles:?}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps"
Expand All @@ -35,6 +42,6 @@ fi
if [ ! -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then if [ ! -L "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ]; then
fixname="steamapps symlink" fixname="steamapps symlink"
fn_fix_msg_start fn_fix_msg_start
ln -s "${HOME}/Steam/steamapps" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps" ln -s "${steamappspath}" "${serverfiles}/Engine/Binaries/ThirdParty/SteamCMD/Linux/steamapps"
fn_fix_msg_end fn_fix_msg_end
fi fi

0 comments on commit 420f4a5

Please sign in to comment.