blob: c7297f3fe6318ac6d764db1e1e1af6db02c19fbf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
systemctl="systemctl --user"
function systemd_status() {
unit="$1"
if $systemctl --quiet is-active "$unit"; then
echo ""
elif $systemctl --quiet is-failed "$unit"; then
echo ""
elif ! $systemctl --quiet is-enabled "$unit"; then
# note that !enabled includes units that have not been found
echo ""
else
echo ""
fi
}
status=""
status+="$(systemd_status internet-unmetered.target)"
status+="$(systemd_status backup.timer)"
status+="$(systemd_status backup.service)"
echo "$status"
echo "$status"
|