fix sendtelegram.config path

This commit is contained in:
Pavel Muhortov 2023-12-19 22:45:10 +03:00
parent 1f8607521f
commit 4444a6c44a
2 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
#! /bin/sh
API_URL="$(grep "API_URL=" | cut -d= -f2)"
SILENCE="$(grep "SILENCE=" | cut -d= -f2)"
CHAT_ID="$(grep "CHAT_ID=" | cut -d= -f2)"
THRD_ID="$(grep "THRD_ID=" | cut -d= -f2)"
API_URL="$(grep "API_URL=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
SILENCE="$(grep "SILENCE=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
CHAT_ID="$(grep "CHAT_ID=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
THRD_ID="$(grep "THRD_ID=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
TXT_MSG="[Authorization] $(cat /etc/hostname):
$(w -h)"

View File

@ -11,10 +11,10 @@
### END INIT INFO
start() {
API_URL="$(grep "API_URL=" | cut -d= -f2)"
SILENCE="$(grep "SILENCE=" | cut -d= -f2)"
CHAT_ID="$(grep "CHAT_ID=" | cut -d= -f2)"
THRD_ID="$(grep "THRD_ID=" | cut -d= -f2)"
API_URL="$(grep "API_URL=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
SILENCE="$(grep "SILENCE=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
CHAT_ID="$(grep "CHAT_ID=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
THRD_ID="$(grep "THRD_ID=" /usr/local/bin/sendtelegram.config | cut -d= -f2)"
TXT_MSG="[System States] $(cat /etc/hostname): computer has been rebooted"
sleep 15