From cf2555bf5ae1525e544e24fe1acaac37f30ab9e8 Mon Sep 17 00:00:00 2001 From: aclist <92275929+aclist@users.noreply.github.com> Date: Fri, 21 Jan 2022 05:42:56 +0900 Subject: [PATCH] Correctly test for steamcmd --- dztui.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dztui.sh b/dztui.sh index 7694101..2541933 100644 --- a/dztui.sh +++ b/dztui.sh @@ -182,7 +182,7 @@ move_files(){ rm -r "$staging_dir"/steamapps } auto_mod_download(){ - sudo -u $steamcmd_user steamcmd "steamcmd +force_install_dir $staging_dir +login $steam_username $(steamcmd_modlist) +quit" + sudo su -c "steamcmd +force_install_dir $staging_dir +login $steam_username $(steamcmd_modlist) +quit" $steamcmd_user [[ "$(ls -A $staging_dir/steamapps)" ]] && move_files || return 1 } auto_mod_install(){ @@ -196,7 +196,7 @@ auto_mod_install(){ elif command -v steamcmd &>/dev/null [[ $? -eq 1 ]]; then - err "steamcmd not found. See: https://developer.valvesoftware.com/wiki/SteamCMD" + err "steamcmd not installed. See: https://developer.valvesoftware.com/wiki/SteamCMD" else printf "[INFO] Found steamcmd user. Downloading mods\n" revert_msg="Something went wrong. Reverting to manual mode"