You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.2 KiB
Bash
38 lines
1.2 KiB
Bash
# linux script server config file about functions encapsulation.
|
|
# Longwei Lai
|
|
###################################################################
|
|
|
|
source "${____FWK_SCRIPT_PATH}/lnx_fwk_path.sh"
|
|
source "${____FWK_SCRIPT_PATH}/lnx_fwk_server.sh"
|
|
source "${____LOGIC_SCRIPT_PATH}/lnx_logic_defs.sh"
|
|
|
|
# get game node id config from server config file
|
|
function get_serverconf_gamenode_id()
|
|
{
|
|
local dbconf_file="${SVR_PATH}/dbconf.lua"
|
|
echo -n "`sed -n -r 's/dbconf\.gamenodeid\s*=\s*([0-9]+).*/\1/p' "${dbconf_file}"`"
|
|
}
|
|
|
|
# get login node id config from server config file
|
|
function get_serverconf_loginnode_id()
|
|
{
|
|
local dbconf_file="${SVR_PATH}/dbconf.lua"
|
|
echo -n "`sed -n -r 's/dbconf\.loginnodeid\s*=\s*([0-9]+).*/\1/p' "${dbconf_file}"`"
|
|
}
|
|
|
|
# get login node id config from server config file
|
|
function get_serverconf_globalnode_id()
|
|
{
|
|
local dbconf_file="${SVR_PATH}/dbconf.lua"
|
|
echo -n "`sed -n -r 's/dbconf\.globalnodeid\s*=\s*([0-9]+).*/\1/p' "${dbconf_file}"`"
|
|
}
|
|
|
|
# get login node id config from server config file
|
|
function get_serverconf_webnode_id()
|
|
{
|
|
local dbconf_file="${SVR_PATH}/dbconf.lua"
|
|
echo -n "`sed -n -r 's/dbconf\.webnodeid\s*=\s*([0-9]+).*/\1/p' "${dbconf_file}"`"
|
|
}
|
|
|
|
|