coreserver: Add support for setting run-state

Signed-off-by: Michael Buesch <m@bues.ch>