diff --git a/converter.conf b/converter.conf index 3c386a4..97c039b 100644 --- a/converter.conf +++ b/converter.conf @@ -6,3 +6,6 @@ imgnames=point-01 point-02 point-04 point-05 point-11 point-12 xscale=1920 yscale=1080 mp4fps=25 + +telegramapiurl=https://api.telegram.org/bot1234567890:YOURAPIKEY +telegramchatid=123456789 \ No newline at end of file diff --git a/converter.sh b/converter.sh index 42e718f..4caaefa 100644 --- a/converter.sh +++ b/converter.sh @@ -1,7 +1,9 @@ #! /bin/bash # -## DESCRIPTION: JPEG to MP4 converter. +## DESCRIPTION: +# JPEG to MP4 converter. +# This is only a local "proof of conept" for testing and debugging. # # @@ -27,6 +29,7 @@ execquite() { } execerror() { addtologs "error: $1" + curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="error: $1" >> /dev/null 2>&1 execquite } getconfig() { @@ -37,6 +40,8 @@ getconfig() { xscale=$(cat $conf | grep "xscale=" | cut -d= -f2) yscale=$(cat $conf | grep "yscale=" | cut -d= -f2) mp4fps=$(cat $conf | grep "mp4fps=" | cut -d= -f2) + telegramapiurl=$(cat $conf | grep "telegramapiurl=" | cut -d= -f2) + telegramchatid=$(cat $conf | grep "telegramchatid=" | cut -d= -f2) } # diff --git a/publisher.sh b/publisher.sh index a87ab77..e2dff81 100644 --- a/publisher.sh +++ b/publisher.sh @@ -32,6 +32,7 @@ execquite() { } execerror() { addtologs "error: $1" + curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="error: $1" >> /dev/null 2>&1 execquite } getconfig() { diff --git a/sequences.conf b/sequences.conf index 99f23ab..9d81d78 100644 --- a/sequences.conf +++ b/sequences.conf @@ -15,3 +15,6 @@ tmppass=pass tmpaddr=192.168.254.254 tmpport=22 tmpnode=28-1a2b3c4d5e6f + +telegramapiurl=https://api.telegram.org/bot1234567890:YOURAPIKEY +telegramchatid=123456789 \ No newline at end of file diff --git a/sequences.sh b/sequences.sh index 36f2622..984fe56 100644 --- a/sequences.sh +++ b/sequences.sh @@ -32,6 +32,7 @@ execquite() { } execerror() { addtologs "error: $1" + curl -s -X POST $telegramapiurl/sendMessage -d chat_id=$telegramchatid -d text="error: $1" >> /dev/null 2>&1 execquite } getconfig() { @@ -49,6 +50,8 @@ getconfig() { tmpaddr=$(cat $conf | grep "tmpaddr=" | cut -d= -f2) tmpport=$(cat $conf | grep "tmpport=" | cut -d= -f2) tmpnode=$(cat $conf | grep "tmpnode=" | cut -d= -f2) + telegramapiurl=$(cat $conf | grep "telegramapiurl=" | cut -d= -f2) + telegramchatid=$(cat $conf | grep "telegramchatid=" | cut -d= -f2) } getairtmp() { local temp=$( \