Browse Source

fix: update some servicename var's that did not get replaced with selfname

pull/2629/head
Daniel Gibbs 5 years ago
parent
commit
755c26eaf1
No known key found for this signature in database GPG Key ID: E50EE233189485E3
  1. 2
      lgsm/functions/alert.sh
  2. 24
      lgsm/functions/core_messages.sh
  3. 8
      linuxgsm.sh

2
lgsm/functions/alert.sh

@ -76,7 +76,7 @@ fn_alert_config(){
alertemoji="🎮"
alertsound="1"
alerturl="not enabled"
alertbody="${servicename} has received a new _default.cfg. Check file for changes."
alertbody="${selfname} has received a new _default.cfg. Check file for changes."
}
if [ "${alert}" == "permissions" ]; then

24
lgsm/functions/core_messages.sh

@ -119,7 +119,7 @@ fn_script_log_info(){
# [ .... ]
fn_print_dots(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[ .... ] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[ .... ] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[ .... ] $*"
fi
@ -128,7 +128,7 @@ fn_print_dots(){
fn_print_dots_nl(){
if [ -n "${commandaction}" ]; then
echo -e "${creeol}[ .... ] ${commandaction} ${servicename}: $*"
echo -e "${creeol}[ .... ] ${commandaction} ${selfname}: $*"
else
echo -e "${creeol}[ .... ] $*"
fi
@ -139,7 +139,7 @@ fn_print_dots_nl(){
# [ OK ]
fn_print_ok(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${green} OK ${default}] $*"
fi
@ -148,7 +148,7 @@ fn_print_ok(){
fn_print_ok_nl(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${green} OK ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${green} OK ${default}] $*"
fi
@ -159,7 +159,7 @@ fn_print_ok_nl(){
# [ FAIL ]
fn_print_fail(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${red} FAIL ${default}] $*"
fi
@ -168,7 +168,7 @@ fn_print_fail(){
fn_print_fail_nl(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${red} FAIL ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${red} FAIL ${default}] $*"
fi
@ -179,7 +179,7 @@ fn_print_fail_nl(){
# [ ERROR ]
fn_print_error(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${red}ERROR ${default}] $*"
fi
@ -188,7 +188,7 @@ fn_print_error(){
fn_print_error_nl(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${red}ERROR ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${red}ERROR ${default}] $*"
fi
@ -199,7 +199,7 @@ fn_print_error_nl(){
# [ WARN ]
fn_print_warn(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${lightyellow} WARN ${default}] $*"
fi
@ -208,7 +208,7 @@ fn_print_warn(){
fn_print_warn_nl(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${lightyellow} WARN ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${lightyellow} WARN ${default}] $*"
fi
@ -219,7 +219,7 @@ fn_print_warn_nl(){
# [ INFO ]
fn_print_info(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${cyan} INFO ${default}] $*"
fi
@ -228,7 +228,7 @@ fn_print_info(){
fn_print_info_nl(){
if [ -n "${commandaction}" ]; then
echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${servicename}: $*"
echo -en "${creeol}[${cyan} INFO ${default}] ${commandaction} ${selfname}: $*"
else
echo -en "${creeol}[${cyan} INFO ${default}] $*"
fi

8
linuxgsm.sh

@ -357,13 +357,13 @@ else
source "${configdirserver}/common.cfg"
fi
# Load the instance.cfg config. If missing download it.
if [ ! -f "${configdirserver}/${servicename}.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${servicename}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
if [ ! -f "${configdirserver}/${selfname}.cfg" ]; then
fn_fetch_config "lgsm/config-default/config-lgsm" "instance-template.cfg" "${configdirserver}" "${selfname}.cfg" "nochmodx" "norun" "noforcedl" "nomd5"
# shellcheck source=/dev/null
source "${configdirserver}/${servicename}.cfg"
source "${configdirserver}/${selfname}.cfg"
else
# shellcheck source=/dev/null
source "${configdirserver}/${servicename}.cfg"
source "${configdirserver}/${selfname}.cfg"
fi
# Load the linuxgsm.sh in to tmpdir. If missing download it.

Loading…
Cancel
Save