base-files: shinit: properly handle dashes in service names
Fixes: FS#3801 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
1854aeec4d
commit
75ea878d1b
@ -22,7 +22,7 @@ service() {
|
|||||||
printf "%-30s\t%10s\t%10s\n" "$F" \
|
printf "%-30s\t%10s\t%10s\n" "$F" \
|
||||||
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
|
$( $($F enabled) && echo "enabled" || echo "disabled" ) \
|
||||||
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
|
$( [ "$(ubus call service list "{ 'verbose': true, 'name': '$(basename $F)' }" \
|
||||||
| jsonfilter -q -e "@.$(basename $F).instances[*].running" | uniq)" = "true" ] \
|
| jsonfilter -q -e "@['$(basename $F)'].instances[*].running" | uniq)" = "true" ] \
|
||||||
&& echo "running" || echo "stopped" )
|
&& echo "running" || echo "stopped" )
|
||||||
done;
|
done;
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
Reference in New Issue
Block a user