You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
574 B
Kotlin

package me.eater.hefbrug.platform_utils.user
import me.eater.hefbrug.access.AccessSkeleton
import me.eater.hefbrug.executor.ExecutionContext
import me.eater.hefbrug.platform_utils.PlatformUtil
class UsermodManager(context: ExecutionContext) : UserManager(context) {
object Util : PlatformUtil<UsermodManager> {
override suspend fun isSupported(access: AccessSkeleton): Boolean {
return access.execute("which", "usermod").exitCode == 0
}
override suspend fun getManager(context: ExecutionContext) = UsermodManager(context)
}
}