Open copystring opened 1 year ago
Or maybe it is useful to use list-unit-files --state=enabled
instead of list-units --type service --all
?
The services which are disabled have the asterisk in front.
which distibution is that?
debian 11 running in a proxmox lxc with nested enabled. With nested it shows the services of the host in addition to it's own services.
Please accept this PR to fix the issue. https://github.com/Scrounger/ioBroker.linux-control/pull/57
Describe the bug
You're using
systemctl list-units --type service --all --no-legend | awk '{out=""; for(i=5;i<=NF;i++){out=out" "$i}; print $1","$2","$3","$4","out}'
to list all services. On my system some services have an asterisk before the actual service name.See this truncated list:
systemctl list-units --type service --all --no-legend | awk '{out=""; for(i=5;i<=NF;i++){out=out" "$i}; print $1","$2","$3","$4","out}' apparmor.service,loaded,active,exited, Load AppArmor profiles apt-daily-upgrade.service,loaded,inactive,dead, Daily apt upgrade and clean activities apt-daily.service,loaded,inactive,dead, Daily apt download activities *,auditd.service,not-found,inactive, dead auditd.service *,connman.service,not-found,inactive, dead connman.service
Resulting in errors like this:
State "linux-control.1.storj.services.*.running" has no existing object, this might lead to an error in future versions
These services either need to be ignored or start to get the service name after the asterisk otherwise the services list is never fully completed. See this:
Versions: