JS8Call - Added support for notifying the user if JS8Call can't be started

This commit is contained in:
Gaston Gonzalez
2024-10-25 11:43:23 -07:00
parent d0d4f5f199
commit be41c4aaa7
+10
View File
@@ -2,6 +2,7 @@
# #
# Author : Gaston Gonzalez # Author : Gaston Gonzalez
# Date : 24 October 2024 # Date : 24 October 2024
# Updated : 25 October 2024
# Purpose : Wrapper script for starting JS8Call with PnP support # Purpose : Wrapper script for starting JS8Call with PnP support
# #
# Preconditions # Preconditions
@@ -21,6 +22,13 @@ if [ $# -ne 1 ]; then
exit 1 exit 1
fi fi
notify_user() {
notify-send \
-t 10000 \
--app-name="EmComm Tools" \
"$1"
}
start() { start() {
update-config && /usr/bin/js8call & update-config && /usr/bin/js8call &
} }
@@ -59,10 +67,12 @@ update-config () {
else else
et-log "No ET_AUDIO device detected." et-log "No ET_AUDIO device detected."
notify_user "Can't start JS8Call. No ET_AUDIO device detected."
exit 1 exit 1
fi fi
else else
et-log "No ET_AUDIO device plugged in." et-log "No ET_AUDIO device plugged in."
notify_user "Can't start JS8Call. No supported audio device plugged in."
exit 1 exit 1
fi fi
} }