Browse Source

console message

pull/3000/head
Daniel Gibbs 6 years ago
parent
commit
365b152ebf
  1. 4
      lgsm/config-default/config-lgsm/arkserver/_default.cfg
  2. 2
      lgsm/functions/check.sh
  3. 17
      lgsm/functions/command_console.sh

4
lgsm/config-default/config-lgsm/arkserver/_default.cfg

@ -138,6 +138,10 @@ stopmode="2"
querymode="2"
querytype="protocol-valve"
## Console type
consoleoutput="off"
consoleverbose="off"
## Game Server Details
# Do not edit
gamename="ARK: Survival Evolved"

2
lgsm/functions/check.sh

@ -44,7 +44,7 @@ if [ "$(whoami)" != "root" ]; then
done
fi
local allowed_commands_array=( command_backup.sh command_console.sh command_debug.sh command_details.sh command_unreal2_maps.sh command_fastdl.sh command_mods_install.sh command_mods_remove.sh command_mods_update.sh command_monitor.sh command_postdetails.sh command_restart.sh command_start.sh command_stop.sh command_test_alert.sh command_ts3_server_pass.sh command_update.sh command_update_functions.sh command_validate.sh command_wipe.sh command_unreal2_maps.sh command_ut99maps.sh)
local allowed_commands_array=( command_backup.sh command_console.sh command_debug.sh command_details.sh command_unreal2_maps.sh command_fastdl.sh command_mods_install.sh command_mods_remove.sh command_mods_update.sh command_monitor.sh command_postdetails.sh command_restart.sh command_start.sh command_stop.sh command_test_alert.sh command_ts3_server_pass.sh command_update.sh command_update_functions.sh command_validate.sh command_wipe.sh command_unreal2_maps.sh command_ut99maps.sh )
for allowed_command in "${allowed_commands_array[@]}"
do
if [ "${allowed_command}" == "${function_selfname}" ]; then

17
lgsm/functions/command_console.sh

@ -10,13 +10,28 @@ local function_selfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
check.sh
fn_print_header
# Verbose output
if [ "${consoleverbose}" == "on" ]; then
fn_print_information_nl "${gamename} produces a verbose output to the console"
elif [ "${consoleverbose}" == "off" ]; then
fn_print_information_nl "${gamename} does NOT produce a verbose output to the console"
fi
# Interactive console
if [ "${consolinteractive}" == "on" ]; then
fn_print_information_nl "${gamename} DOES allow server commands to be entered in to the console"
elif [ "${consolinteractive}" == "off" ]; then
fn_print_information_nl "${gamename} does NOT allow server commands to be entered in to the console"
fi
if [ "${shortname}" == "rust" ]||[ "${shortname}" == "hw" ]||[ "${shortname}" == "ark" ]; then
fn_print_information_nl "${gamename} does not produce a verbose output to the console"
fn_print_information_nl "${gamename} does not allow server commands to be entered in to the console"
fi
fn_print_information_nl "Press \"CTRL+b\" then \"d\" to exit console."
fn_print_warning_nl "Do NOT press CTRL+c to exit."
echo -e " * https://docs.linuxgsm.com/commands/console"
echo -e "* https://docs.linuxgsm.com/commands/console"
echo -e ""
if ! fn_prompt_yn "Continue?" Y; then
return

Loading…
Cancel
Save