Browse Source

fix(update): fix update on start not working (#2901)

* add space to grep to get accurate session name
* move messages to get proper output
pull/2902/head
Daniel Gibbs 5 years ago
committed by GitHub
parent
commit
04bb8485b8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      lgsm/functions/command_start.sh
  2. 2
      lgsm/functions/info_distro.sh
  3. 4
      lgsm/functions/update_factorio.sh
  4. 4
      lgsm/functions/update_minecraft.sh
  5. 4
      lgsm/functions/update_minecraft_bedrock.sh
  6. 4
      lgsm/functions/update_mta.sh
  7. 4
      lgsm/functions/update_mumble.sh
  8. 4
      lgsm/functions/update_steamcmd.sh
  9. 4
      lgsm/functions/update_ts3.sh

7
lgsm/functions/command_start.sh

@ -165,13 +165,12 @@ fn_start_tmux(){
echo -en "\n"
}
check.sh
fn_print_dots "${servername}"
# Is the server already started.
# $status comes from check_status.sh, which is run by check.sh for this command
if [ "${status}" != "0" ]; then
fn_print_dots "${servername}"
fn_print_info_nl "${servername} is already running"
fn_script_log_error "${servername} is already running"
if [ -z "${exitbypass}" ]; then
@ -189,8 +188,12 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon
exitbypass=1
unset updateonstart
command_update.sh
commandname="START"
commandaction="Starting"
fi
fn_print_dots "${servername}"
if [ "${shortname}" == "ts3" ]; then
fn_start_teamspeak3
else

2
lgsm/functions/info_distro.sh

@ -9,7 +9,7 @@ functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
### Game Server pid
if [ "${status}" == "1" ]; then
gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}"| grep "^${sessionname}"|awk '{print $2}')
gameserverpid=$(tmux list-sessions -F "#{session_name} #{pane_pid}" | grep "^${sessionname} " | awk '{print $2}')
fi
### Distro information

4
lgsm/functions/update_factorio.sh

@ -170,7 +170,3 @@ else
fn_update_factorio_remotebuild
fn_update_factorio_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

4
lgsm/functions/update_minecraft.sh

@ -218,7 +218,3 @@ else
fn_update_minecraft_remotebuild
fn_update_minecraft_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

4
lgsm/functions/update_minecraft_bedrock.sh

@ -178,7 +178,3 @@ else
fn_update_minecraft_remotebuild
fn_update_minecraft_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

4
lgsm/functions/update_mta.sh

@ -209,7 +209,3 @@ else
fn_update_mta_remotebuild
fn_update_mta_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

4
lgsm/functions/update_mumble.sh

@ -148,7 +148,3 @@ else
fn_update_mumble_remotebuild
fn_update_mumble_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

4
lgsm/functions/update_steamcmd.sh

@ -246,7 +246,3 @@ else
fn_update_steamcmd_remotebuild
fn_update_steamcmd_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

4
lgsm/functions/update_ts3.sh

@ -219,7 +219,3 @@ else
fn_update_ts3_remotebuild
fn_update_ts3_compare
fi
if [ "${commandname}" != "INSTALL" ]; then
core_exit.sh
fi

Loading…
Cancel
Save