diff --git a/files/scripts/eget.sh b/files/scripts/eget.sh index 0339a52..b38daa4 100644 --- a/files/scripts/eget.sh +++ b/files/scripts/eget.sh @@ -9,4 +9,5 @@ eget atanunq/viu --to=/usr/bin eget atuinsh/atuin -a gnu -a '^update' --to=/usr/bin eget containers/podlet --to=/usr/bin -a gnu eget creativeprojects/resticprofile -a no_self_update --to=/usr/bin +eget stunnel/tgsend -f 'tgsend-*' --to=/usr/bin/tgsend eget watchexec/watchexec -a musl.tar.xz _ -a '^b3' -a '^sha512' --to=/usr/bin diff --git a/files/system/etc/.gitkeep b/files/system/etc/.gitkeep deleted file mode 100644 index 8b13789..0000000 --- a/files/system/etc/.gitkeep +++ /dev/null @@ -1 +0,0 @@ - diff --git a/files/system/etc/systemd/system/unit-status-telegram@.service b/files/system/etc/systemd/system/unit-status-telegram@.service deleted file mode 100644 index 194134a..0000000 --- a/files/system/etc/systemd/system/unit-status-telegram@.service +++ /dev/null @@ -1,8 +0,0 @@ -# via from https://github.com/CurrySoftware/Telegram-Notifier -[Unit] -Description=Unit Status Telegram Service -After=network.target - -[Service] -Type=simple -ExecStart=/usr/bin/unit-status-telegram %I diff --git a/files/system/usr/.gitkeep b/files/system/usr/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/files/system/usr/bin/telegram-msg-send b/files/system/usr/bin/telegram-msg-send deleted file mode 100755 index dab6632..0000000 --- a/files/system/usr/bin/telegram-msg-send +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -# via from https://github.com/CurrySoftware/Telegram-Notifier -. /etc/telegram/key - -URL="https://api.telegram.org/bot$TELEGRAM_KEY/sendMessage" -curl -s -d "chat_id=$CHAT_ID&disable_web_page_preview=1&text=$1" "$URL" >/dev/null diff --git a/files/system/usr/bin/unit-status-telegram b/files/system/usr/bin/unit-status-telegram deleted file mode 100755 index 84829e5..0000000 --- a/files/system/usr/bin/unit-status-telegram +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -UNIT=$1 - -UNITSTATUS=$(systemctl status "$UNIT") -ALERT=$(echo -e "\u26A0") - -/usr/bin/telegram-msg-send "$ALERT Unit failed $UNIT $ALERT -Status: -$UNITSTATUS" diff --git a/files/system/usr/lib/systemd/system/unit-status-telegram@.service b/files/system/usr/lib/systemd/system/unit-status-telegram@.service new file mode 100644 index 0000000..e4ea98f --- /dev/null +++ b/files/system/usr/lib/systemd/system/unit-status-telegram@.service @@ -0,0 +1,9 @@ +[Unit] +Description=Unit Status Telegram Service +After=network.target +ConditionPathExists=/etc/tgsend-env + +[Service] +Type=simple +EnvironmentFile=/etc/tgsend-env +ExecStart=/bin/sh -c '/usr/bin/tgsend -token ${TG_TOKEN} -chatid ${TG_CHAT_ID} -format markdown -message "‼️ %H unit status: \`\`\`$(systemctl status %i)\`\`\`"'