diff --git a/scripts/utils/link-systemd.sh b/scripts/utils/link-systemd.sh index d00c1284..e9bf0dbd 100755 --- a/scripts/utils/link-systemd.sh +++ b/scripts/utils/link-systemd.sh @@ -29,9 +29,10 @@ fi echo "๐Ÿ” Creating symbolic links for AITBC systemd files..." -# Remove existing aitbc-* files (but not directories) +# Remove existing aitbc-* files and stale drop-in directories echo "๐Ÿงน Removing existing systemd files..." find "$ACTIVE_SYSTEMD_DIR" -name "aitbc-*" -type f -delete 2>/dev/null || true +find "$ACTIVE_SYSTEMD_DIR" -maxdepth 1 -name "aitbc-*.d" -exec rm -rf {} + 2>/dev/null || true # Create symbolic links echo "๐Ÿ”— Creating symbolic links..."