git.iko.soy/distributed-process
on master help sign in
Figure out how to start background process
commit911bf29410b71df56df63a5eafbd641f8be14a97 authorEdsko de Vries <edsko@well-typed.com> dateFri 27 Jul 2012, 17:47 (14 years ago) parentfb980ca
1 file changed+2−4
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure.hs+2−4
distributed-process-azure/src/Control/Distributed/Process/Backend/Azure.hs+2−4
@@ -87,13 +87,11 @@ apiStartOnVM :: AzureParameters -> VirtualMachine -> IO ()
8787apiStartOnVM params vm = do
8888 _ <- SSH.initialize True
8989 let ep = Azure.vmSshEndpoint vm
90− SSH.withSSH2 (azureSshKnownHosts params)
90+ _ <- SSH.withSSH2 (azureSshKnownHosts params)
9191 (azureSshPublicKey params)
9292 (azureSshPrivateKey params)
9393 (azureSshUserName params)
9494 (endpointVip ep)
9595 (read $ endpointPort ep) $ \fd s ch -> do
96− _ <- SSH.retryIfNeeded fd s $ SSH.channelExecute ch "/home/edsko/testservice"
97− threadDelay $ 10 * 1000000 -- 10 seconds
98− return ()
96+ SSH.retryIfNeeded fd s $ SSH.channelExecute ch "nohup /home/edsko/testservice >/dev/null 2>&1 &"
9997 SSH.exit