mirror of
https://codeberg.org/spire/dispenser.git
synced 2026-06-03 18:14:06 +02:00
setup swap in one command
This commit is contained in:
parent
eb787e84d0
commit
7956df6dfd
1 changed files with 2 additions and 3 deletions
|
|
@ -103,9 +103,8 @@ async fn setup(ssh: &mut SshSession, config: &ServerConfig) -> Result<(), Error>
|
|||
|
||||
ssh.exec("dd if=/dev/zero of=/swapfile bs=1M count=1024")
|
||||
.await?;
|
||||
ssh.exec("chmod 600 /swapfile").await?;
|
||||
ssh.exec("mkswap /swapfile").await?;
|
||||
ssh.exec("swapon /swapfile").await?;
|
||||
ssh.exec("chmod 600 /swapfile && mkswap /swapfile && swapon /swapfile")
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue