Browse Source

changes to stop start

pull/2565/head
Daniel Gibbs 6 years ago
parent
commit
31db555ecb
  1. 8
      lgsm/functions/command_start.sh
  2. 18
      lgsm/functions/command_stop.sh

8
lgsm/functions/command_start.sh

@ -39,7 +39,7 @@ fn_start_teamspeak3(){
if [ "${ts3serverpass}" == "1" ]; then if [ "${ts3serverpass}" == "1" ]; then
./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" > /dev/null 2>&1 ./ts3server_startscript.sh start serveradmin_password="${newpassword}" inifile="${servercfgfullpath}" > /dev/null 2>&1
else else
./ts3server_startscript.sh start inifile="${servercfgfullpath}" > /dev/null 2>&1 fn_start_tmux
fi fi
fn_sleep_time fn_sleep_time
check_status.sh check_status.sh
@ -210,5 +210,9 @@ if [ "${updateonstart}" == "yes" ]||[ "${updateonstart}" == "1" ]||[ "${updateon
command_update.sh command_update.sh
fi fi
fn_start_tmux if [ "${shortname}" == "ts3" ]; then
fn_start_teamspeak3
else
fn_start_tmux
fi
core_exit.sh core_exit.sh

18
lgsm/functions/command_stop.sh

@ -200,22 +200,6 @@ fn_stop_graceful_select(){
fn_stop_graceful_sdtd fn_stop_graceful_sdtd
elif [ "${stopmode}" == "9" ]; then elif [ "${stopmode}" == "9" ]; then
fn_stop_graceful_goldsource fn_stop_graceful_goldsource
elif [ "${stopmode}" == "10" ]; then
fn_stop_teamspeak3
fi
}
fn_stop_teamspeak3(){
fn_print_dots "${servername}"
"${serverfiles}"/ts3server_startscript.sh stop > /dev/null 2>&1
check_status.sh
if [ "${status}" == "0" ]; then
rm -f "${rootdir}/${lockselfname}"
fn_print_ok_nl "${servername}"
fn_script_log_pass "Stopped ${servername}"
else
fn_print_fail_nl "Unable to stop ${servername}"
fn_script_log_error "Unable to stop ${servername}"
fi fi
} }
@ -240,8 +224,6 @@ fn_stop_pre_check(){
if [ "${status}" == "0" ]; then if [ "${status}" == "0" ]; then
fn_print_info_nl "${servername} is already stopped" fn_print_info_nl "${servername} is already stopped"
fn_script_log_error "${servername} is already stopped" fn_script_log_error "${servername} is already stopped"
elif [ "${shortname}" == "ts3" ]; then
fn_stop_teamspeak3
else else
# Select graceful shutdown. # Select graceful shutdown.
fn_stop_graceful_select fn_stop_graceful_select

Loading…
Cancel
Save