package me.eater.hefbrug.platform_utils.service import me.eater.hefbrug.executor.ExecutionContext import me.eater.hefbrug.platform_utils.PlatformUtil abstract class ServiceManager(protected val context: ExecutionContext) { protected val ro = context.roAccess protected val rw = context.rwAccess abstract suspend fun isRunning(name: String): Boolean abstract suspend fun isEnabled(name: String): Boolean abstract suspend fun hasAutoStart(name: String): Boolean abstract suspend fun setState( name: String, enabled: Boolean, running: Boolean, autostart: Boolean = enabled && running ) companion object : PlatformUtil.Provider( "service manager", RunitManager.Util ) }