mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 10:21:52 +00:00
agent: invert autoCheckUpdates
This commit is contained in:
committed by
Aiden McClelland
parent
df05fade25
commit
7417bfdbfa
@@ -58,7 +58,7 @@ getServerR = handleS9ErrT $ do
|
||||
wifi <- WpaSupplicant.runWlan0 $ liftA2 WifiList WpaSupplicant.getCurrentNetwork WpaSupplicant.listNetworks
|
||||
specs <- getSpecs settings
|
||||
welcomeAck <- fmap isJust . lift . runDB . Persist.get $ WelcomeAckKey agentVersion
|
||||
autoCheckUpdates <- runM $ injectFilesystemBaseFromContext settings $ existsSystemPath autoCheckUpdatesPath
|
||||
autoCheckUpdates <- runM $ injectFilesystemBaseFromContext settings $ fmap not (existsSystemPath disableAutoCheckUpdatesPath)
|
||||
|
||||
let sid = T.drop 7 $ specsNetworkId specs
|
||||
|
||||
@@ -125,8 +125,8 @@ patchAutoCheckUpdatesR = do
|
||||
settings <- getsYesod appSettings
|
||||
BoolPatchReq val <- requireCheckJsonBody
|
||||
runM $ injectFilesystemBaseFromContext settings $ if val
|
||||
then writeSystemPath autoCheckUpdatesPath ""
|
||||
else deleteSystemPath autoCheckUpdatesPath
|
||||
then deleteSystemPath disableAutoCheckUpdatesPath
|
||||
else writeSystemPath disableAutoCheckUpdatesPath ""
|
||||
|
||||
patchFile :: SystemPath -> Handler ()
|
||||
patchFile path = do
|
||||
|
||||
@@ -193,8 +193,8 @@ agentTorHiddenServicePrivateKeyPath = agentTorHiddenServiceDirectory <> "/hs_ed2
|
||||
serverNamePath :: SystemPath
|
||||
serverNamePath = "/root/agent/name.txt"
|
||||
|
||||
autoCheckUpdatesPath :: SystemPath
|
||||
autoCheckUpdatesPath = "/root/agent/.autoCheckUpdates"
|
||||
disableAutoCheckUpdatesPath :: SystemPath
|
||||
disableAutoCheckUpdatesPath = "/root/agent/.disableAutoCheckUpdates"
|
||||
|
||||
altRegistryUrlPath :: SystemPath
|
||||
altRegistryUrlPath = "/root/agent/alt_registry_url.txt"
|
||||
|
||||
Reference in New Issue
Block a user