Browse Source

feat(config): add secrets.cfg

pull/3080/head
Daniel Gibbs 5 years ago
parent
commit
4b389cb5c3
  1. 5
      lgsm/config-default/config-lgsm/common-secrets-template.cfg
  2. 5
      lgsm/config-default/config-lgsm/instance-secrets-template.cfg
  3. 18
      linuxgsm.sh
  4. 18
      tests/tests_fctrserver.sh
  5. 18
      tests/tests_jc2server.sh
  6. 18
      tests/tests_mcserver.sh
  7. 18
      tests/tests_ts3server.sh

5
lgsm/config-default/config-lgsm/common-secrets-template.cfg

@ -0,0 +1,5 @@
##################################
######## Common Secrets ##########
##################################
# PLACE SECRET SETTINGS HERE
## These settings will apply to all instances.

5
lgsm/config-default/config-lgsm/instance-secrets-template.cfg

@ -0,0 +1,5 @@
##################################
####### Instance Secrets #########
##################################
# PLACE SECRET SETTINGS HERE
## These settings will apply to all instances.

18
linuxgsm.sh

@ -411,6 +411,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/common.cfg"
fi
# Load the common-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/common-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "common-secrets-template.cfg" "${configdirserver}" "common-secrets.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.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"
@ -420,6 +429,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}.cfg"
fi
# Load the instance-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/${selfname}-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-secrets-template.cfg" "${configdirserver}" "${selfname}-secrets.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then

18
tests/tests_fctrserver.sh

@ -420,6 +420,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/common.cfg"
fi
# Load the common-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/common-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "common-secrets-template.cfg" "${configdirserver}" "common-secrets.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.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"
@ -429,6 +438,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}.cfg"
fi
# Load the instance-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/${selfname}-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-secrets-template.cfg" "${configdirserver}" "${selfname}-secrets.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then

18
tests/tests_jc2server.sh

@ -421,6 +421,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/common.cfg"
fi
# Load the common-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/common-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "common-secrets-template.cfg" "${configdirserver}" "common-secrets.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.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 instance-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/${selfname}-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-secrets-template.cfg" "${configdirserver}" "${selfname}-secrets.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then

18
tests/tests_mcserver.sh

@ -421,6 +421,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/common.cfg"
fi
# Load the common-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/common-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "common-secrets.cfg" "${configdirserver}" "common-secrets.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.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 instance-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/${selfname}-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-secrets-template.cfg" "${configdirserver}" "${selfname}-secrets.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then

18
tests/tests_ts3server.sh

@ -421,6 +421,15 @@ else
# shellcheck source=/dev/null
source "${configdirserver}/common.cfg"
fi
# Load the common-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/common-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "common-secrets-template.cfg" "${configdirserver}" "common-secrets.cfg" "${chmodx}" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/common-secrets.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 instance-secrets.cfg config. If missing download it.
if [ ! -f "${configdirserver}/${selfname}-secrets.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-secrets-template.cfg" "${configdirserver}" "${selfname}-secrets.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/${selfname}-secrets.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it.
if [ ! -f "${tmpdir}/linuxgsm.sh" ]; then

Loading…
Cancel
Save