diff --git a/lgsm/functions/command_stop.sh b/lgsm/functions/command_stop.sh index a5d18c7f6..f89c019ec 100644 --- a/lgsm/functions/command_stop.sh +++ b/lgsm/functions/command_stop.sh @@ -174,7 +174,7 @@ fn_stop_ark(){ fi if [[ ${#queryport} -gt 0 ]] ; then - for (( pidcheck=0 ; pidcheck < ${MADPIDITER} ; pidcheck++ )) ; do + for (( pidcheck=0 ; pidcheck < ${MAXPIDITER} ; pidcheck++ )) ; do pid=$(netstat -nap 2>/dev/null | grep ^udp[[:space:]] |\ grep :${queryport}[[:space:]] | rev | awk '{print $1}' |\ rev | cut -d\/ -f1) diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index 9c03e0e56..d31154ec3 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -22,8 +22,10 @@ fn_validation(){ cd "${rootdir}/steamcmd" - if [ $(command -v unbuffer) ]; then + if [ $(command -v unbuffer) ]; then unbuffer=unbuffer + elif [ $(command -v stdbuf) ]; then + unbuffer="stdbuf -i0 -o0 -e0" fi if [ "${engine}" == "goldsource" ]; then diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index ba25c57a6..4b48f0a66 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -45,6 +45,8 @@ fn_install_server_files_steamcmd(){ # Detects if unbuffer command is available. if [ $(command -v unbuffer) ]; then unbuffer=unbuffer + elif [ $(command -v stdbuf) ]; then + unbuffer="stdbuf -i0 -o0 -e0" fi if [ "${counter}" -le "4" ]; then @@ -107,4 +109,4 @@ if [ -z "${autoinstall}" ]; then * ) echo "Please answer yes or no.";; esac done -fi \ No newline at end of file +fi diff --git a/lgsm/functions/update_dl.sh b/lgsm/functions/update_dl.sh index ee1cc361c..0adda4991 100644 --- a/lgsm/functions/update_dl.sh +++ b/lgsm/functions/update_dl.sh @@ -16,6 +16,8 @@ fn_steamcmd_dl(){ # Detects if unbuffer command is available. if [ $(command -v unbuffer) ]; then unbuffer=unbuffer + elif [ $(command -v stdbuf) ]; then + unbuffer="stdbuf -i0 -o0 -e0" fi if [ "${engine}" == "goldsource" ]; then