swaync-service-dispatcher: simplify quoting

This commit is contained in:
Colin 2024-06-18 06:40:44 +00:00
parent 5a63f294c0
commit 5879499924

View File

@ -17,7 +17,12 @@ log() {
checkActive() {
# simulate a dry-run start. if no actions would be performed, then the service is up.
# alternative is s6-svstat, but that doesn't support oneshots
test -z "$(s6-rc -n 0 -b start "$service")" && echo true || echo false
local s6Output=$(s6-rc -n 0 -b start "$service")
if [ -z "$s6Output" ]; then
echo true
else
echo false
fi
}
startService() {
log "startService: $service"