blob: efd7762f3719197f517b08aa260bfc13635a1d7c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
post_install() {
echo
echo "==> HDAS installed successfully!"
echo
echo "To enable the monitoring service for your user:"
echo " sudo systemctl enable --now hdas@\$USER"
echo
echo "Check status:"
echo " sudo systemctl status hdas@\$USER"
echo
echo "View logs:"
echo " sudo journalctl -u hdas@\$USER -f"
echo
}
post_upgrade() {
systemctl daemon-reload 2>/dev/null || true
echo
echo "==> HDAS upgraded. Restart the service if running:"
echo " sudo systemctl restart hdas@\$USER"
echo
}
pre_remove() {
# Disable all hdas@ instances
for service in /etc/systemd/system/multi-user.target.wants/hdas@*.service; do
if [ -e "$service" ]; then
instance=$(basename "$service" | sed 's/hdas@\(.*\)\.service/\1/')
systemctl disable --now "hdas@$instance" 2>/dev/null || true
fi
done
echo "==> HDAS service disabled"
}
|