Skip to content

Instantly share code, notes, and snippets.

@vanch
Last active October 29, 2017 04:52
Show Gist options
  • Select an option

  • Save vanch/7a79ce24b03761e7c549 to your computer and use it in GitHub Desktop.

Select an option

Save vanch/7a79ce24b03761e7c549 to your computer and use it in GitHub Desktop.

Revisions

  1. vanch revised this gist Mar 28, 2016. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions tg-send2chat
    Original file line number Diff line number Diff line change
    @@ -5,10 +5,12 @@ subject=$2
    body=$3

    /usr/bin/telegram-cli --bot \
    --disable-readline \
    --profile bot \
    --disable-names \
    --disable-output \
    --disable-readline \
    --rsa-key /var/lib/zabbix/.telegram-cli/server.pub \
    --username zabbix \
    --exec "msg $to $subject" || exit 1
    --exec "msg $to $subject" | grep FAIL && exit 1

    exit 0
    exit 0
  2. vanch revised this gist Sep 4, 2015. No changes.
  3. vanch revised this gist Sep 4, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion tg-send2chat
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@ body=$3
    /usr/bin/telegram-cli --bot \
    --disable-readline \
    --disable-names \
    -k /var/lib/zabbix/.telegram-cli/server.pub \
    --rsa-key /var/lib/zabbix/.telegram-cli/server.pub \
    --username zabbix \
    --exec "msg $to $subject" || exit 1

  4. vanch created this gist Sep 4, 2015.
    14 changes: 14 additions & 0 deletions tg-send2chat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/bin/bash

    to=$1
    subject=$2
    body=$3

    /usr/bin/telegram-cli --bot \
    --disable-readline \
    --disable-names \
    -k /var/lib/zabbix/.telegram-cli/server.pub \
    --username zabbix \
    --exec "msg $to $subject" || exit 1

    exit 0