swaync-service-dispatcher: add -b
to block on service state query, to avoid incorrect responses when run in parallel
This commit is contained in:
@@ -23,7 +23,7 @@ checkActive() {
|
|||||||
s6)
|
s6)
|
||||||
# simulate a dry-run start. if no actions would be performed, then the service is up.
|
# 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
|
# alternative is s6-svstat, but that doesn't support oneshots
|
||||||
test -z "$(s6-rc -n 0 start "$service")" && echo true || echo false
|
test -z "$(s6-rc -n 0 -b start "$service")" && echo true || echo false
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -34,7 +34,7 @@ startService() {
|
|||||||
/run/wrappers/bin/sudo systemctl start "$service"
|
/run/wrappers/bin/sudo systemctl start "$service"
|
||||||
;;
|
;;
|
||||||
s6)
|
s6)
|
||||||
s6-rc start "$service"
|
s6-rc -b start "$service"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
@@ -45,7 +45,7 @@ stopService() {
|
|||||||
/run/wrappers/bin/sudo systemctl stop "$service"
|
/run/wrappers/bin/sudo systemctl stop "$service"
|
||||||
;;
|
;;
|
||||||
s6)
|
s6)
|
||||||
s6-rc stop "$service"
|
s6-rc -b stop "$service"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user