don't lazily unmount unless on error

This commit is contained in:
Aiden McClelland
2024-07-29 11:15:25 -06:00
parent dafa638558
commit 08003c59b6
6 changed files with 17 additions and 22 deletions

View File

@@ -65,7 +65,7 @@ pub async fn init_postgres(datadir: impl AsRef<Path>) -> Result<(), Error> {
.await?
.success()
{
unmount("/var/lib/postgresql").await?;
unmount("/var/lib/postgresql", true).await?;
}
let exists = tokio::fs::metadata(&db_dir).await.is_ok();
if !exists {