]>
code.delx.au - monosys/blob - healthcheck/systemd-user-units
3 users
="$(systemctl list-units | \
4 sed -nE 's/.*user@([0-9]+)\.service .*loaded active running.*/\1/p' | \
9 homedir
="$(getent passwd "$user"|cut -d: -f6)"
10 for timer
in "$homedir"/.config
/systemd
/user
/*.timer
; do
11 if ! [ -f "$timer" ]; then
14 timerunit
="$(basename "$timer")"
15 if ! systemctl
--user -M"$user@" is-enabled
"$timerunit" > /dev
/null
; then
16 echo "disabled timer $timer"
19 if ! systemctl
--user -M"$user@" is-active
"$timerunit" > /dev
/null
; then
20 echo "inactive timer $timer"
25 if systemctl
--user -M "$user@" is-system-running
> /dev
/null
; then
29 echo -e "# systemctl --user -M "$user@
" --failed"
30 systemctl
--user -M "$user@" --failed