2025-08-23 23:51:37 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
|
|
case "$1" in
|
2025-08-31 11:25:42 +02:00
|
|
|
remove|deconfigure)
|
|
|
|
|
# Stop and disable the service on removal
|
2025-08-25 08:23:11 +02:00
|
|
|
if systemctl is-active --quiet skyview-adsb.service; then
|
|
|
|
|
systemctl stop skyview-adsb.service
|
2025-08-23 23:51:37 +02:00
|
|
|
fi
|
|
|
|
|
|
2025-08-25 08:23:11 +02:00
|
|
|
if systemctl is-enabled --quiet skyview-adsb.service; then
|
|
|
|
|
systemctl disable skyview-adsb.service
|
2025-08-23 23:51:37 +02:00
|
|
|
fi
|
|
|
|
|
;;
|
2025-08-31 11:25:42 +02:00
|
|
|
upgrade)
|
|
|
|
|
# Only stop service during upgrade, preserve enabled state
|
|
|
|
|
if systemctl is-active --quiet skyview-adsb.service; then
|
|
|
|
|
systemctl stop skyview-adsb.service
|
|
|
|
|
fi
|
|
|
|
|
# Don't disable - postinst will restart if service was enabled
|
|
|
|
|
;;
|
2025-08-23 23:51:37 +02:00
|
|
|
esac
|
|
|
|
|
|
|
|
|
|
exit 0
|