mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +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
|
wifi <- WpaSupplicant.runWlan0 $ liftA2 WifiList WpaSupplicant.getCurrentNetwork WpaSupplicant.listNetworks
|
||||||
specs <- getSpecs settings
|
specs <- getSpecs settings
|
||||||
welcomeAck <- fmap isJust . lift . runDB . Persist.get $ WelcomeAckKey agentVersion
|
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
|
let sid = T.drop 7 $ specsNetworkId specs
|
||||||
|
|
||||||
@@ -125,8 +125,8 @@ patchAutoCheckUpdatesR = do
|
|||||||
settings <- getsYesod appSettings
|
settings <- getsYesod appSettings
|
||||||
BoolPatchReq val <- requireCheckJsonBody
|
BoolPatchReq val <- requireCheckJsonBody
|
||||||
runM $ injectFilesystemBaseFromContext settings $ if val
|
runM $ injectFilesystemBaseFromContext settings $ if val
|
||||||
then writeSystemPath autoCheckUpdatesPath ""
|
then deleteSystemPath disableAutoCheckUpdatesPath
|
||||||
else deleteSystemPath autoCheckUpdatesPath
|
else writeSystemPath disableAutoCheckUpdatesPath ""
|
||||||
|
|
||||||
patchFile :: SystemPath -> Handler ()
|
patchFile :: SystemPath -> Handler ()
|
||||||
patchFile path = do
|
patchFile path = do
|
||||||
|
|||||||
@@ -193,8 +193,8 @@ agentTorHiddenServicePrivateKeyPath = agentTorHiddenServiceDirectory <> "/hs_ed2
|
|||||||
serverNamePath :: SystemPath
|
serverNamePath :: SystemPath
|
||||||
serverNamePath = "/root/agent/name.txt"
|
serverNamePath = "/root/agent/name.txt"
|
||||||
|
|
||||||
autoCheckUpdatesPath :: SystemPath
|
disableAutoCheckUpdatesPath :: SystemPath
|
||||||
autoCheckUpdatesPath = "/root/agent/.autoCheckUpdates"
|
disableAutoCheckUpdatesPath = "/root/agent/.disableAutoCheckUpdates"
|
||||||
|
|
||||||
altRegistryUrlPath :: SystemPath
|
altRegistryUrlPath :: SystemPath
|
||||||
altRegistryUrlPath = "/root/agent/alt_registry_url.txt"
|
altRegistryUrlPath = "/root/agent/alt_registry_url.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user