blob: c7297f3fe6318ac6d764db1e1e1af6db02c19fbf (
plain) (
tree)
|
|
#!/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"
|