Skip to content

Commit

Permalink
feat: add tgsend, use it for the failure-reporting systemd unit
Browse files Browse the repository at this point in the history
  • Loading branch information
yacoob committed Nov 29, 2024
1 parent 0af645c commit d7aba3c
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 25 deletions.
1 change: 1 addition & 0 deletions files/scripts/eget.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion files/system/etc/.gitkeep

This file was deleted.

8 changes: 0 additions & 8 deletions files/system/etc/systemd/system/[email protected]

This file was deleted.

Empty file removed files/system/usr/.gitkeep
Empty file.
6 changes: 0 additions & 6 deletions files/system/usr/bin/telegram-msg-send

This file was deleted.

10 changes: 0 additions & 10 deletions files/system/usr/bin/unit-status-telegram

This file was deleted.

9 changes: 9 additions & 0 deletions files/system/usr/lib/systemd/system/[email protected]
Original file line number Diff line number Diff line change
@@ -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)\`\`\`"'

0 comments on commit d7aba3c

Please sign in to comment.