switch to auto-restarter daemon

This commit is contained in:
Aiden McClelland
2020-12-01 21:36:50 -07:00
committed by Keagan McClelland
parent f68c13f57f
commit 30f8b8e6cd
5 changed files with 61 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
use super::*;
use crate::util::Invoke;
const V0_2_7: emver::Version = emver::Version::new(0, 2, 7, 0);
@@ -13,6 +14,15 @@ impl VersionT for Version {
&V0_2_7
}
async fn up(&self) -> Result<(), Error> {
for (app_id, _) in crate::apps::list_info().await? {
tokio::process::Command::new("docker")
.arg("update")
.arg("--restart")
.arg("no")
.arg(app_id)
.invoke("Docker")
.await?;
}
Ok(())
}
async fn down(&self) -> Result<(), Error> {