mirror of
https://github.com/GameServerManagers/LinuxGSM.git
synced 2025-01-09 04:27:35 +08:00
feat(config): add secrets config to store sensitive settings (#3080)
* feat(config): add secrets.cfg * changed name of config * updated wording
This commit is contained in:
parent
1e78dbd926
commit
ccbe56926c
@ -0,0 +1,5 @@
|
||||
##################################
|
||||
######## Common Secrets ##########
|
||||
##################################
|
||||
# PLACE GLOBAL SECRET SETTINGS HERE
|
||||
## These settings will apply to all instances.
|
@ -0,0 +1,5 @@
|
||||
##################################
|
||||
####### Instance Secrets #########
|
||||
##################################
|
||||
# PLACE INSTANCE SECRET SETTINGS HERE
|
||||
## These settings will apply to a specific instance.
|
18
linuxgsm.sh
18
linuxgsm.sh
@ -412,6 +412,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/common.cfg"
|
||||
fi
|
||||
# Load the secrets-common.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
fi
|
||||
# Load the instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
@ -421,6 +430,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/${selfname}.cfg"
|
||||
fi
|
||||
# Load the secrets-instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
fi
|
||||
|
||||
# Load the linuxgsm.sh in to tmpdir. If missing download it.
|
||||
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
|
||||
|
@ -421,6 +421,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/common.cfg"
|
||||
fi
|
||||
# Load the secrets-common.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
fi
|
||||
# Load the instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
@ -430,6 +439,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/${selfname}.cfg"
|
||||
fi
|
||||
# Load the secrets-instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
fi
|
||||
|
||||
# Load the linuxgsm.sh in to tmpdir. If missing download it.
|
||||
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
|
||||
|
@ -422,6 +422,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/common.cfg"
|
||||
fi
|
||||
# Load the secrets-common.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
fi
|
||||
# Load the instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
@ -431,6 +440,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/${selfname}.cfg"
|
||||
fi
|
||||
# Load the secrets-instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
fi
|
||||
|
||||
# Load the linuxgsm.sh in to tmpdir. If missing download it.
|
||||
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
|
||||
|
@ -422,6 +422,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/common.cfg"
|
||||
fi
|
||||
# Load the secrets-common.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
fi
|
||||
# Load the instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
@ -431,6 +440,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/${selfname}.cfg"
|
||||
fi
|
||||
# Load the secrets-instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
fi
|
||||
|
||||
# Load the linuxgsm.sh in to tmpdir. If missing download it.
|
||||
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
|
||||
|
@ -422,6 +422,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/common.cfg"
|
||||
fi
|
||||
# Load the secrets-common.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-common.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-common-template.cfg" "${configdirserver}" "secrets-common.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-common.cfg"
|
||||
fi
|
||||
# Load the instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
@ -431,6 +440,15 @@ else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/${selfname}.cfg"
|
||||
fi
|
||||
# Load the secrets-instance.cfg config. If missing download it.
|
||||
if [ ! -f "${configdirserver}/secrets-${selfname}.cfg" ]; then
|
||||
fn_fetch_config "lgsm/config-default/config-lgsm" "secrets-instance-template.cfg" "${configdirserver}" "secrets-${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
else
|
||||
# shellcheck source=/dev/null
|
||||
source "${configdirserver}/secrets-${selfname}.cfg"
|
||||
fi
|
||||
|
||||
# Load the linuxgsm.sh in to tmpdir. If missing download it.
|
||||
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user