Commit 0c83b6cf authored by Seblu's avatar Seblu
Browse files

checkservice: use systemctl --state

parent ea77a07e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -71,9 +71,8 @@ trap '' SIGHUP
[[ -z $no_reload ]] && systemctl --system daemon-reload

# list of running services
# don't use systemctl -s because require v206 of systemd. too young at the moment.
declare -a services
services=($(systemctl --no-legend --full -t service|grep running|sed -rn 's/^(.*\.service).*/\1/p'))
services=($(systemctl --no-legend --full --type service --state running|cut -f1 -d' '))

# beggar count
declare -a needy=() pids=()