mirror of
https://codeberg.org/spire/dispenser.git
synced 2026-06-03 18:14:06 +02:00
swap
This commit is contained in:
parent
fde10d8ae0
commit
f3f1d69b9e
1 changed files with 6 additions and 0 deletions
|
|
@ -100,6 +100,12 @@ async fn setup(ssh: &mut SshSession, config: &ServerConfig) -> Result<(), Error>
|
||||||
if !result.success() {
|
if !result.success() {
|
||||||
return Err(Error::SetupError(result.output()));
|
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(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue