Files
ansible-repo/files/zsh/rm-orphaned-zshes.sh
hogweed1 6534be9582
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 1s
well,
2026-11-20 18:37:24 +10:00

12 lines
698 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
sleep 2
# pkill с флагом -P 1 убивает ТОЛЬКО те процессы, у которых PPID равен 1.
# Флаг -x ищет точное совпадение имени процесса (безопаснее, чем -f, чтобы не зацепить случайные скрипты).
# (Обратите внимание: для gitstatusd я убрал -x, так как в плагинах вроде Powerlevel10k бинарник часто называется gitstatusd-linux-x86_64, и строгое совпадение -x его пропустит).
pkill -9 -P 1 -x zsh 2>/dev/null || true
pkill -9 -P 1 gitstatusd 2>/dev/null || true
exit 0