28 lines
764 B
Bash
Executable File
28 lines
764 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
|
# shellcheck disable=SC1091
|
|
source "$SCRIPT_DIR/common.sh"
|
|
|
|
if command -v systemctl >/dev/null 2>&1; then
|
|
systemctl disable --now hy-app-monitor-cleanup.timer >/dev/null 2>&1 || true
|
|
name=""
|
|
for name in $(suite_service_names); do
|
|
systemctl disable --now "$(service_unit_name "$name")" >/dev/null 2>&1 || true
|
|
done
|
|
fi
|
|
|
|
name=""
|
|
for name in $(suite_service_names); do
|
|
rm -f "/etc/systemd/system/$(service_unit_name "$name")"
|
|
done
|
|
rm -f /etc/systemd/system/hy-app-monitor-cleanup.service
|
|
rm -f /etc/systemd/system/hy-app-monitor-cleanup.timer
|
|
|
|
if command -v systemctl >/dev/null 2>&1; then
|
|
systemctl daemon-reload || true
|
|
fi
|
|
|
|
echo "systemd units removed"
|