Skip to content

pkill/pgrep: add support for selecting processes by environment variables

Some of my cron jobs leak processes somehow, so I have other jobs that kill some processes from the systemd /system.slice/cron.service cgroup that the cron daemon and all cron jobs are put into. I'd like to replace the scripts that do this with pkill one-liners.

pkill --env PABS_CRON_JOB --env-val 1 -u pabs pkill --env PABS_CRON_JOB_FOO -u pabs

-- bye, pabs

https://bonedaddy.net/pabs3/