sh.zio.notify: fix host emoji not working, fix certain case not working
parent
49a5c08cad
commit
136e180328
|
@ -182,8 +182,8 @@ function trigger_notify() {
|
||||||
"$notify_prog" \
|
"$notify_prog" \
|
||||||
--invoked-by "$(basename $me_filename)" \
|
--invoked-by "$(basename $me_filename)" \
|
||||||
--level "$level" \
|
--level "$level" \
|
||||||
--message="$message" \
|
--message "$message" \
|
||||||
--title="$title"
|
--title "$title"
|
||||||
else
|
else
|
||||||
"$notify_prog" \
|
"$notify_prog" \
|
||||||
--file "$log_path" \
|
--file "$log_path" \
|
||||||
|
|
|
@ -15,7 +15,7 @@ function get_host_emoji() {
|
||||||
hostname_length="${#hostname}"
|
hostname_length="${#hostname}"
|
||||||
|
|
||||||
if [[ "$hostname" =~ ([a-z]{2}[0-9]{2,3}) ]]; then
|
if [[ "$hostname" =~ ([a-z]{2}[0-9]{2,3}) ]]; then
|
||||||
case "$hostname" in
|
case "${hostname:0:2}" in
|
||||||
"de") echo "🇩🇪" ;;
|
"de") echo "🇩🇪" ;;
|
||||||
"fi") echo "🇫🇮" ;;
|
"fi") echo "🇫🇮" ;;
|
||||||
"fr") echo "🇫🇷" ;;
|
"fr") echo "🇫🇷" ;;
|
||||||
|
|
Loading…
Reference in New Issue