Added unicode icons in messages
Added unicode icons in messages
This commit is contained in:
18
scripts/unix/usr/lib/systemd/system/cai-watchdog.service
Normal file
18
scripts/unix/usr/lib/systemd/system/cai-watchdog.service
Normal 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
|
||||
3
scripts/unix/usr/local/sbin/cai-watchdog-stopped
Normal file
3
scripts/unix/usr/local/sbin/cai-watchdog-stopped
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
ICON_WARNING=$(echo -e "\U26A0")
|
||||
send-telegram "${ICON_WARNING} ATTENTION! Watchdog is stopped!"
|
||||
@@ -1,5 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
rcpt=$1
|
||||
subj=$2
|
||||
message=$3
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user