From be41c4aaa7dd865e67f2010fb5c6ce1fd5b0b24a Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Fri, 25 Oct 2024 11:43:23 -0700 Subject: [PATCH] JS8Call - Added support for notifying the user if JS8Call can't be started --- overlay/opt/emcomm-tools/bin/et-js8call | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/overlay/opt/emcomm-tools/bin/et-js8call b/overlay/opt/emcomm-tools/bin/et-js8call index c784270..69404d9 100755 --- a/overlay/opt/emcomm-tools/bin/et-js8call +++ b/overlay/opt/emcomm-tools/bin/et-js8call @@ -2,6 +2,7 @@ # # Author : Gaston Gonzalez # Date : 24 October 2024 +# Updated : 25 October 2024 # Purpose : Wrapper script for starting JS8Call with PnP support # # Preconditions @@ -21,6 +22,13 @@ if [ $# -ne 1 ]; then exit 1 fi +notify_user() { + notify-send \ + -t 10000 \ + --app-name="EmComm Tools" \ + "$1" +} + start() { update-config && /usr/bin/js8call & } @@ -59,10 +67,12 @@ update-config () { else et-log "No ET_AUDIO device detected." + notify_user "Can't start JS8Call. No ET_AUDIO device detected." exit 1 fi else et-log "No ET_AUDIO device plugged in." + notify_user "Can't start JS8Call. No supported audio device plugged in." exit 1 fi }