mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
JS8Call - Added support for notifying the user if JS8Call can't be started
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user