et-mode Changed approach for et-mode design. Removed PolKit rule for group-level systemd acesses. Switched to user-level systemd service pattern. Added initial systemd service for ARDOP

This commit is contained in:
Gaston Gonzalez
2024-11-06 10:36:03 -07:00
parent 6099c147a5
commit ce5b49b855
3 changed files with 33 additions and 6 deletions
@@ -1,4 +0,0 @@
[Allow Group to Manage Service]
Identity=unix-group:et-data
Action=org.freedesktop.systemd1.manage-units
ResultActive=yes
@@ -0,0 +1,21 @@
# Author : Gaston Gonzalez
# Date : 6 November 2024
# Purpose : User systemd unit file for EmComm Tools ARDOP service
#
# Usage:
# Check status : systemctl --user status et-service-ardop
# Start service : systemctl --user start et-service-ardop
# Stop service : systemctl --user stop et-service-ardop
# Reload this config : systemctl --user daemon-reload
[Unit]
Description=EmComm Tools ARDOP service
# Disable conditional check for audio device. Allow et-ardop to enforce.
#ConditionPathExists=/dev/et-audio
[Service]
ExecStart=/opt/emcomm-tools/bin/et-ardop
Restart=no
[Install]
WantedBy=multi-user.target
+12 -2
View File
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Author : Gaston Gonzalez
# Date : 5 November 2024
# Date : 6 November 2024
# Purpose : Wrapper script for starting ARDOP
#
# Preconditions:
@@ -16,6 +16,14 @@
ARDOP_PORT=8515
notify_user() {
notify-send \
-t 10000 \
--app-name="EmComm Tools" \
"$1"
}
[ -z ${ET_LOG_DIR} ] && ET_LOG_DIR="${HOME}/.local/share/emcomm-tools"
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
@@ -37,10 +45,12 @@ if [ -e /dev/et-audio ]; then
else
et-log "Can't start ARDOP modem. No ET_AUDIO device detected."
notify_user "Select radio and plug it in"
exit 1
fi
else
et-log "No ET_AUDIO device plugged in. No supported audio device plugged it."
et-log "No ET_AUDIO device plugged in. No supported audio device plugged in."
notify_user "Select radio and plug it in"
exit 1
fi