mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
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:
@@ -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
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 5 November 2024
|
# Date : 6 November 2024
|
||||||
# Purpose : Wrapper script for starting ARDOP
|
# Purpose : Wrapper script for starting ARDOP
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
@@ -16,6 +16,14 @@
|
|||||||
|
|
||||||
ARDOP_PORT=8515
|
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"
|
[ -z ${ET_LOG_DIR} ] && ET_LOG_DIR="${HOME}/.local/share/emcomm-tools"
|
||||||
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
|
[ ! -e ${ET_LOG_DIR} ] && mkdir -p ${ET_LOG_DIR}
|
||||||
|
|
||||||
@@ -37,10 +45,12 @@ if [ -e /dev/et-audio ]; then
|
|||||||
|
|
||||||
else
|
else
|
||||||
et-log "Can't start ARDOP modem. No ET_AUDIO device detected."
|
et-log "Can't start ARDOP modem. No ET_AUDIO device detected."
|
||||||
|
notify_user "Select radio and plug it in"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user