Skip to content

Commit

Permalink
fix: Steam log symlink points to correct location
Browse files Browse the repository at this point in the history
This commit adds the functionality to create a symbolic link for Steam logs if it is missing. The symlink is created in the specified log directory.
  • Loading branch information
dgibbs64 committed Sep 2, 2023
1 parent a5dbb4a commit aaff7c9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions lgsm/modules/check_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,8 @@ fi
if [ "${gamelogdir}" ] && [ -d "${gamelogdir}" ] && [ ! -d "${logdir}/server" ]; then
fn_check_logs
fi

# Create Steam log symlink if missing
if [ ! -d "${logdir}/steam" ] && [ -n "${appid}" ]; then
fn_check_logs
fi
8 changes: 4 additions & 4 deletions lgsm/modules/install_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ if [ "${gamelogdir}" ]; then
fi

# If server uses SteamCMD create a symbolic link to the Steam logs.
if [ -d "${rootdir}/Steam/logs" ]; then
if [ ! -L "${logdir}/steamcmd" ]; then
echo -en "creating symlink to steam log dir: ${logdir}/steamcmd -> ${rootdir}/Steam/logs..."
if ! ln -nfs "${rootdir}/Steam/logs" "${logdir}/steamcmd"; then
if [ -d "${HOME}/.steam/steam/logs" ]; then
if [ ! -L "${logdir}/steam" ]; then
echo -en "creating symlink to steam log dir: ${logdir}/steam -> ${HOME}/.steam/steam/logs..."
if ! ln -nfs "${HOME}/.steam/steam/logs" "${logdir}/steam"; then
fn_print_fail_eol_nl
core_exit.sh
else
Expand Down

0 comments on commit aaff7c9

Please sign in to comment.