mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 20:43:41 +00:00
0.2.5 initial commit
Makefile incomplete
This commit is contained in:
12
agent/src/Lib/ProductKey.hs
Normal file
12
agent/src/Lib/ProductKey.hs
Normal file
@@ -0,0 +1,12 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user