|
@@ -9,6 +9,13 @@ lgsm_version="210516"
|
|
|
local modulename="Console"
|
|
local modulename="Console"
|
|
|
function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
|
|
function_selfname="$(basename $(readlink -f "${BASH_SOURCE[0]}"))"
|
|
|
|
|
|
|
|
|
|
+fn_console_access(){
|
|
|
|
|
+ fn_print_ok_nl "Starting"
|
|
|
|
|
+ fn_script_log_info "Accessed"
|
|
|
|
|
+ sleep 1
|
|
|
|
|
+ tmux attach-session -t ${servicename}
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
check.sh
|
|
check.sh
|
|
|
echo ""
|
|
echo ""
|
|
|
echo "${gamename} Console"
|
|
echo "${gamename} Console"
|
|
@@ -29,10 +36,7 @@ fn_print_dots "Starting"
|
|
|
sleep 1
|
|
sleep 1
|
|
|
check_status.sh
|
|
check_status.sh
|
|
|
if [ "${status}" != "0" ]; then
|
|
if [ "${status}" != "0" ]; then
|
|
|
- fn_print_ok_nl "Starting"
|
|
|
|
|
- fn_script_log_info "Accessed"
|
|
|
|
|
- sleep 1
|
|
|
|
|
- tmux attach-session -t ${servicename}
|
|
|
|
|
|
|
+ fn_console_access
|
|
|
else
|
|
else
|
|
|
fn_print_fail_nl "Server not running"
|
|
fn_print_fail_nl "Server not running"
|
|
|
fn_script_log_error "Failed to access: Server not running"
|
|
fn_script_log_error "Failed to access: Server not running"
|
|
@@ -40,10 +44,11 @@ else
|
|
|
while true; do
|
|
while true; do
|
|
|
read -p "Do you want to start the server? [y/N]" yn
|
|
read -p "Do you want to start the server? [y/N]" yn
|
|
|
case $yn in
|
|
case $yn in
|
|
|
- [Yy]* ) command_start.sh; break;;
|
|
|
|
|
|
|
+ [Yy]* ) exitbypass=1; command_start.sh; break;;
|
|
|
[Nn]* ) break;;
|
|
[Nn]* ) break;;
|
|
|
* ) echo "Please answer yes or no.";;
|
|
* ) echo "Please answer yes or no.";;
|
|
|
esac
|
|
esac
|
|
|
done
|
|
done
|
|
|
|
|
+ fn_console_access
|
|
|
fi
|
|
fi
|
|
|
core_exit.sh
|
|
core_exit.sh
|