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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
6 additions and
31 deletions
-
lgsm/functions/command_start.sh
-
lgsm/functions/info_distro.sh
-
lgsm/functions/update_factorio.sh
-
lgsm/functions/update_minecraft.sh
-
lgsm/functions/update_minecraft_bedrock.sh
-
lgsm/functions/update_mta.sh
-
lgsm/functions/update_mumble.sh
-
lgsm/functions/update_steamcmd.sh
-
lgsm/functions/update_ts3.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 |
|
|
|
|
|
@ -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 |
|
|
|
|
|
|
|
|
|
@ -170,7 +170,3 @@ else |
|
|
|
fn_update_factorio_remotebuild |
|
|
|
fn_update_factorio_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
|
|
@ -218,7 +218,3 @@ else |
|
|
|
fn_update_minecraft_remotebuild |
|
|
|
fn_update_minecraft_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
|
|
@ -178,7 +178,3 @@ else |
|
|
|
fn_update_minecraft_remotebuild |
|
|
|
fn_update_minecraft_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
|
|
@ -209,7 +209,3 @@ else |
|
|
|
fn_update_mta_remotebuild |
|
|
|
fn_update_mta_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
|
|
@ -148,7 +148,3 @@ else |
|
|
|
fn_update_mumble_remotebuild |
|
|
|
fn_update_mumble_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
|
|
@ -246,7 +246,3 @@ else |
|
|
|
fn_update_steamcmd_remotebuild |
|
|
|
fn_update_steamcmd_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|
|
|
@ -219,7 +219,3 @@ else |
|
|
|
fn_update_ts3_remotebuild |
|
|
|
fn_update_ts3_compare |
|
|
|
fi |
|
|
|
|
|
|
|
if [ "${commandname}" != "INSTALL" ]; then |
|
|
|
core_exit.sh |
|
|
|
fi |
|
|
|