This commit is contained in:
Robin Appelman 2021-03-31 21:17:45 +02:00
commit f3f1d69b9e

View file

@ -100,6 +100,12 @@ async fn setup(ssh: &mut SshSession, config: &ServerConfig) -> Result<(), Error>
if !result.success() {
return Err(Error::SetupError(result.output()));
}
ssh.exec("dd if=/dev/zero of=/swapfile bs=1M count=512")
.await?;
ssh.exec("chmod 600 /swapfile").await?;
ssh.exec("mkswap /swapfile").await?;
ssh.exec("swapon /swapfile").await?;
Ok(())
}