base-files: fix status display command
If service() is called w/o parameter then the status display for services with multiple instances is incorrect. E.g. samba4 or wpad have 2 instances. Signed-off-by: Alexander Egorenkov <egorenar-dev@posteo.net>
This commit is contained in:
parent
c5ad183dde
commit
2c898cfb59
@ -22,7 +22,7 @@ service() {
|
||||
printf "%-30s\t%10s\t%10s\n" "$F" \
|
||||
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
|
||||
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
|
||||
| jsonfilter -q -e "@.$(basename $F).instances[*].running")" = "true" ] \
|
||||
| jsonfilter -q -e "@.$(basename $F).instances[*].running" | uniq)" = "true" ] \
|
||||
&& echo "running" || echo "stopped" )
|
||||
done;
|
||||
return 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user