From 4444a6c44a61ca323677358896965ab6ada8e6e3 Mon Sep 17 00:00:00 2001 From: Pavel Muhortov Date: Tue, 19 Dec 2023 22:45:10 +0300 Subject: [PATCH] fix sendtelegram.config path --- templates/sendtelegram-login.sh | 8 ++++---- templates/sendtelegram-reboot.sh | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/sendtelegram-login.sh b/templates/sendtelegram-login.sh index 72ee182..cee4cb4 100644 --- a/templates/sendtelegram-login.sh +++ b/templates/sendtelegram-login.sh @@ -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)" diff --git a/templates/sendtelegram-reboot.sh b/templates/sendtelegram-reboot.sh index e06b76b..7437d67 100644 --- a/templates/sendtelegram-reboot.sh +++ b/templates/sendtelegram-reboot.sh @@ -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