Added unicode icons in messages

Added unicode icons in messages
This commit is contained in:
2022-06-29 01:38:00 +03:00
parent 2605fef9be
commit 56d738bf8e
6 changed files with 25 additions and 17 deletions

View File

@@ -0,0 +1,18 @@
[Unit]
Description=Watchdog service
[Service]
User=wwwrun
Group=www
Type=simple
ExecStart=/usr/local/sbin/cai-watchdog
#ExecStopPost=/usr/local/sbin/cai-watchdog-stopped
#ExecStopPost=send-telegram 'ATTENTION! Watchdog is stopped!'
KillMode=control-group
NotifyAccess=all
SuccessExitStatus=2
[Install]
WantedBy=multi-user.target
Alias=cai_watchdog

View File

@@ -0,0 +1,3 @@
#!/bin/bash
ICON_WARNING=$(echo -e "\U26A0")
send-telegram "${ICON_WARNING} ATTENTION! Watchdog is stopped!"

View File

@@ -1,5 +1,4 @@
#!/bin/bash
rcpt=$1
subj=$2
message=$3

View File

@@ -1,5 +1,4 @@
#!/bin/bash
SCRIPT_NAME=$0
MESSAGE_TEXT=$1
@@ -26,4 +25,4 @@ if [ -z "${MESSAGE_TEXT}" ]
exit 0
fi
curl -s --data "text=${MESSAGE_TEXT}" --data "chat_id=$GROUP_ID" 'https://api.telegram.org/bot'$BOT_TOKEN'/sendMessage' > /dev/null
curl -s --data "text=${MESSAGE_TEXT}" --data "chat_id=$GROUP_ID" 'https://api.telegram.org/bot'$BOT_TOKEN'/sendMessage' > /dev/null