From a369bbe5779c6fb9f822b77b11413909e064fc8f Mon Sep 17 00:00:00 2001 From: Alexander Hurd Date: Fri, 5 Feb 2016 05:36:46 -0500 Subject: [PATCH 1/4] filename fix --- functions/install_ts3.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/install_ts3.sh b/functions/install_ts3.sh index f90f91073..5ae2c755a 100644 --- a/functions/install_ts3.sh +++ b/functions/install_ts3.sh @@ -65,7 +65,7 @@ else exit $? fi echo -e "copying to ${filesdir}...\c" -cp -R "${rootdir}/teamspeak3-server_linux-${ts3arch}/"* "${filesdir}" 2> ".${servicename}-cp-error.tmp" +cp -R "${rootdir}/teamspeak3-server_linux_${ts3arch}/"* "${filesdir}" 2> ".${servicename}-cp-error.tmp" local status=$? if [ ${status} -eq 0 ]; then echo "OK" From 2303a8b89835d6bf46b7d9a32f60266db3e1d6bf Mon Sep 17 00:00:00 2001 From: Alexander Hurd Date: Thu, 16 Jun 2016 19:59:05 -0400 Subject: [PATCH 2/4] enabling automatic dependency installation --- lgsm/functions/check_deps.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lgsm/functions/check_deps.sh b/lgsm/functions/check_deps.sh index fc366354f..ef0e3b452 100644 --- a/lgsm/functions/check_deps.sh +++ b/lgsm/functions/check_deps.sh @@ -79,9 +79,11 @@ fn_found_missing_deps(){ sleep 1 echo -en " \r" if [ -n "$(command -v dpkg-query)" ]; then - echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}" + cmd="sudo dpkg --add-architecture i386; sudo apt-get -y install ${array_deps_missing[@]}" + eval $cmd elif [ -n "$(command -v yum)" ]; then - echo "yum install ${array_deps_missing[@]}" + cmd="sudo yum -y install ${array_deps_missing[@]}" + eval $cmd fi else echo "" @@ -91,7 +93,7 @@ fn_found_missing_deps(){ if [ -n "$(command -v dpkg-query)" ]; then echo "sudo dpkg --add-architecture i386; sudo apt-get install ${array_deps_missing[@]}" elif [ -n "$(command -v yum)" ]; then - echo "yum install ${array_deps_missing[@]}" + echo "sudo yum install ${array_deps_missing[@]}" fi echo "" fi From f58d11d4bf3b990fb0ead76eab067c31dc2572c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20=27DaMaxx=27=20B=C3=BChring?= Date: Tue, 21 Jun 2016 15:22:33 +0200 Subject: [PATCH 3/4] Fix for Steam Guard Authentication, possibly dirty --- lgsm/functions/install_server_files.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 4b383a31f..1f305f06c 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -53,18 +53,18 @@ fn_install_server_files_steamcmd(){ if [ "${counter}" -le "4" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit + ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit + ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit local exitcode=$? fi elif [ "${counter}" -ge "5" ]; then if [ "${engine}" == "goldsource" ]; then - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit + ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? else - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit + ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit local exitcode=$? fi fi @@ -82,7 +82,7 @@ fn_install_server_files_steamcmd(){ counter="0" while [ "${counter}" -le "4" ]; do counter=$((counter+1)) - ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit + ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit local exitcode=$? done fi From 44bbcf6917052b55ea1bab33b5f103b4ffec1d5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20=27DaMaxx=27=20B=C3=BChring?= Date: Wed, 22 Jun 2016 13:31:23 +0200 Subject: [PATCH 4/4] removed 'unbuffer' completely and replaced it with stdbuf --- lgsm/functions/command_validate.sh | 4 +--- lgsm/functions/install_server_files.sh | 14 ++++++-------- lgsm/functions/update_dl.sh | 4 +--- 3 files changed, 8 insertions(+), 14 deletions(-) diff --git a/lgsm/functions/command_validate.sh b/lgsm/functions/command_validate.sh index d31154ec3..ffaa0de45 100644 --- a/lgsm/functions/command_validate.sh +++ b/lgsm/functions/command_validate.sh @@ -22,9 +22,7 @@ fn_validation(){ cd "${rootdir}/steamcmd" - if [ $(command -v unbuffer) ]; then - unbuffer=unbuffer - elif [ $(command -v stdbuf) ]; then + if [ $(command -v stdbuf) ]; then unbuffer="stdbuf -i0 -o0 -e0" fi diff --git a/lgsm/functions/install_server_files.sh b/lgsm/functions/install_server_files.sh index 1f305f06c..bb03d6a5c 100644 --- a/lgsm/functions/install_server_files.sh +++ b/lgsm/functions/install_server_files.sh @@ -45,26 +45,24 @@ fn_install_server_files_steamcmd(){ fi # Detects if unbuffer command is available. - if [ $(command -v unbuffer) ]; then - unbuffer=unbuffer - elif [ $(command -v stdbuf) ]; then + if [ $(command -v stdbuf) ]; then unbuffer="stdbuf -i0 -o0 -e0" fi if [ "${counter}" -le "4" ]; then if [ "${engine}" == "goldsource" ]; then - ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} +quit local exitcode=$? else - ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" +quit local exitcode=$? fi elif [ "${counter}" -ge "5" ]; then if [ "${engine}" == "goldsource" ]; then - ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod "${appidmod}" +app_update "${appid}" ${branch} -validate +quit local exitcode=$? else - ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_update "${appid}" -validate +quit local exitcode=$? fi fi @@ -82,7 +80,7 @@ fn_install_server_files_steamcmd(){ counter="0" while [ "${counter}" -le "4" ]; do counter=$((counter+1)) - ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit + ${unbuffer} ./steamcmd.sh +login "${steamuser}" "${steampass}" +force_install_dir "${filesdir}" +app_set_config 90 mod ${appidmod} +app_update "${appid}" -validate +quit local exitcode=$? done fi diff --git a/lgsm/functions/update_dl.sh b/lgsm/functions/update_dl.sh index 0adda4991..a72322952 100644 --- a/lgsm/functions/update_dl.sh +++ b/lgsm/functions/update_dl.sh @@ -14,9 +14,7 @@ fn_steamcmd_dl(){ cd "steamcmd" # Detects if unbuffer command is available. - if [ $(command -v unbuffer) ]; then - unbuffer=unbuffer - elif [ $(command -v stdbuf) ]; then + if [ $(command -v stdbuf) ]; then unbuffer="stdbuf -i0 -o0 -e0" fi