mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
13 lines
356 B
Haskell
13 lines
356 B
Haskell
module Lib.ProductKey where
|
|
|
|
import Startlude
|
|
import Protolude.Unsafe ( unsafeHead )
|
|
|
|
import System.FilePath
|
|
|
|
productKeyPath :: FilePath -> FilePath
|
|
productKeyPath rt = rt </> "root/agent/product_key"
|
|
|
|
getProductKey :: Text -> IO Text
|
|
getProductKey rt = unsafeHead . lines <$> readFile (productKeyPath $ toS rt)
|