2024-11-12 07:43:20 -07:00
|
|
|
#!/bin/bash
|
|
|
|
|
#
|
|
|
|
|
# Author : Gaston Gonzalez
|
|
|
|
|
# Date : 12 November 2024
|
2026-06-28 13:00:23 -07:00
|
|
|
# Updated : 28 June 2026
|
2024-11-12 07:43:20 -07:00
|
|
|
# Purpose : Stops all EmComm Tools sound-based services (i.e. modems) and
|
|
|
|
|
# amatuer radio applications to ensure a clean start for the next mode.
|
|
|
|
|
|
2025-02-07 05:45:17 -07:00
|
|
|
stop_pat() {
|
|
|
|
|
PS_OUT=$(ps -ef | grep "[p]at http")
|
|
|
|
|
|
|
|
|
|
if [[ $? -eq 0 ]]; then
|
|
|
|
|
PAT_PID=$(ps -ef | grep "[p]at http" | awk '{print $2}')
|
|
|
|
|
kill -9 ${PAT_PID}
|
|
|
|
|
fi
|
|
|
|
|
}
|
|
|
|
|
|
2024-11-12 07:43:20 -07:00
|
|
|
# 1. Attempt to stop all EmComm Tools services regardless if they are running.
|
|
|
|
|
# 2. Stop the applications first, then the modems.
|
|
|
|
|
stop_all_services() {
|
|
|
|
|
systemctl --user stop et-service-winlink-ardop
|
|
|
|
|
systemctl --user stop et-service-winlink-packet
|
2025-02-03 16:48:33 -07:00
|
|
|
systemctl --user stop et-service-winlink-native-packet
|
2026-05-12 08:41:09 -07:00
|
|
|
systemctl --user stop et-service-reticulum-300
|
|
|
|
|
systemctl --user stop et-service-reticulum-1200
|
2024-11-12 07:43:20 -07:00
|
|
|
systemctl --user stop et-service-ardop
|
2025-01-14 02:10:22 -07:00
|
|
|
systemctl --user stop et-service-direwolf-300
|
|
|
|
|
systemctl --user stop et-service-direwolf-9600
|
2024-11-12 07:43:20 -07:00
|
|
|
systemctl --user stop et-service-direwolf-simple
|
|
|
|
|
systemctl --user stop et-service-direwolf-aprs-digipeater
|
|
|
|
|
systemctl --user stop et-service-direwolf-packet-digipeater
|
2026-06-28 13:00:23 -07:00
|
|
|
systemctl --user stop et-service-modem73-default
|
2025-02-07 02:30:32 -07:00
|
|
|
|
|
|
|
|
# Stop VARA with a sledge hammer
|
|
|
|
|
pkill et-winlink
|
|
|
|
|
pkill et-vara
|
|
|
|
|
pkill VARA
|
2025-02-07 05:45:17 -07:00
|
|
|
|
|
|
|
|
stop_pat
|
2024-11-12 07:43:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
et-log "Stopping all services"
|
|
|
|
|
stop_all_services
|