Skip to content
Permalink
Browse files

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

…fname
  • Loading branch information
dgibbs64 committed Nov 30, 2019
1 parent d340fff commit 755c26eaf13faaf37d448840d3fc9731cb3839d6
Showing with 17 additions and 17 deletions.
  1. +1 −1 lgsm/functions/alert.sh
  2. +12 −12 lgsm/functions/core_messages.sh
  3. +4 −4 linuxgsm.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
@@ -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
@@ -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.

0 comments on commit 755c26e

Please sign in to comment.
You can’t perform that action at this time.