mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 12:11:56 +00:00
purge the word app
This commit is contained in:
@@ -71,9 +71,14 @@ async fn init(cfg_path: Option<&str>) -> Result<(), Error> {
|
|||||||
.arg(&tmp_docker)
|
.arg(&tmp_docker)
|
||||||
.invoke(embassy::ErrorKind::Filesystem)
|
.invoke(embassy::ErrorKind::Filesystem)
|
||||||
.await?;
|
.await?;
|
||||||
|
Command::new("systemctl")
|
||||||
|
.arg("stop")
|
||||||
|
.arg("docker")
|
||||||
|
.invoke(embassy::ErrorKind::Journald)
|
||||||
|
.await?;
|
||||||
embassy::disk::util::bind(&tmp_docker, "/var/lib/docker", false).await?;
|
embassy::disk::util::bind(&tmp_docker, "/var/lib/docker", false).await?;
|
||||||
Command::new("systemctl")
|
Command::new("systemctl")
|
||||||
.arg("restart")
|
.arg("start")
|
||||||
.arg("docker")
|
.arg("docker")
|
||||||
.invoke(embassy::ErrorKind::Journald)
|
.invoke(embassy::ErrorKind::Journald)
|
||||||
.await?;
|
.await?;
|
||||||
|
|||||||
@@ -1980,9 +1980,9 @@ mod test {
|
|||||||
"lan-address": {
|
"lan-address": {
|
||||||
"name": "LAN Address",
|
"name": "LAN Address",
|
||||||
"type": "pointer",
|
"type": "pointer",
|
||||||
"subtype": "app",
|
"subtype": "package",
|
||||||
"target": "lan-address",
|
"target": "lan-address",
|
||||||
"app-id": "bitcoind",
|
"package-id": "bitcoind",
|
||||||
"description": "the lan address"
|
"description": "the lan address"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ pub async fn install(
|
|||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return Err(Error::new(
|
return Err(Error::new(
|
||||||
anyhow!("Cannot install over an app in a transient state"),
|
anyhow!("Cannot install over a package in a transient state"),
|
||||||
crate::ErrorKind::InvalidRequest,
|
crate::ErrorKind::InvalidRequest,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,11 @@
|
|||||||
pub const CONFIG_PATH: &'static str = "/etc/embassy/config.toml";
|
pub const CONFIG_PATH: &'static str = "/etc/embassy/config.toml";
|
||||||
pub const TOR_RC: &'static str = "/root/appmgr/tor/torrc";
|
|
||||||
pub const SERVICES_YAML: &'static str = "tor/services.yaml";
|
pub const SERVICES_YAML: &'static str = "tor/services.yaml";
|
||||||
pub const VOLUMES: &'static str = "/root/volumes";
|
pub const VOLUMES: &'static str = "/root/volumes";
|
||||||
pub const PERSISTENCE_DIR: &'static str = "/root/appmgr";
|
|
||||||
pub const TMP_DIR: &'static str = "/root/tmp/appmgr";
|
|
||||||
pub const BACKUP_MOUNT_POINT: &'static str = "/mnt/backup_drive";
|
pub const BACKUP_MOUNT_POINT: &'static str = "/mnt/backup_drive";
|
||||||
pub const BACKUP_DIR: &'static str = "Embassy Backups";
|
pub const BACKUP_DIR: &'static str = "Embassy Backups";
|
||||||
pub const BUFFER_SIZE: usize = 1024;
|
pub const BUFFER_SIZE: usize = 1024;
|
||||||
pub const HOST_IP: [u8; 4] = [172, 18, 0, 1];
|
pub const HOST_IP: [u8; 4] = [172, 18, 0, 1];
|
||||||
|
|
||||||
lazy_static::lazy_static! {
|
|
||||||
pub static ref REGISTRY_URL: String = std::env::var("REGISTRY_URL").unwrap_or_else(|_| "https://registry.start9labs.com".to_owned());
|
|
||||||
pub static ref SYS_REGISTRY_URL: String = format!("{}/sys", *REGISTRY_URL);
|
|
||||||
pub static ref APP_REGISTRY_URL: String = format!("{}/apps", *REGISTRY_URL);
|
|
||||||
pub static ref QUIET: tokio::sync::RwLock<bool> = tokio::sync::RwLock::new(!std::env::var("APPMGR_QUIET").map(|a| a == "0").unwrap_or(true));
|
|
||||||
}
|
|
||||||
|
|
||||||
pub mod action;
|
pub mod action;
|
||||||
pub mod auth;
|
pub mod auth;
|
||||||
pub mod backup;
|
pub mod backup;
|
||||||
|
|||||||
@@ -305,10 +305,10 @@ impl Manager {
|
|||||||
.unwrap(); // recv is still in scope, cannot fail
|
.unwrap(); // recv is still in scope, cannot fail
|
||||||
}
|
}
|
||||||
Ok(Err(e)) => {
|
Ok(Err(e)) => {
|
||||||
log::error!("application crashed: {}: {}", e.0, e.1)
|
log::error!("service crashed: {}: {}", e.0, e.1)
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("failed to start application: {}", e)
|
log::error!("failed to start service: {}", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ impl MdnsControllerInner {
|
|||||||
}
|
}
|
||||||
fn init() -> Self {
|
fn init() -> Self {
|
||||||
unsafe {
|
unsafe {
|
||||||
// let app_list = crate::apps::list_info().await?;
|
|
||||||
|
|
||||||
let simple_poll = avahi_sys::avahi_simple_poll_new();
|
let simple_poll = avahi_sys::avahi_simple_poll_new();
|
||||||
let poll = avahi_sys::avahi_simple_poll_get(simple_poll);
|
let poll = avahi_sys::avahi_simple_poll_get(simple_poll);
|
||||||
let mut stack_err = 0;
|
let mut stack_err = 0;
|
||||||
|
|||||||
@@ -24,6 +24,13 @@ impl Shutdown {
|
|||||||
.unwrap()
|
.unwrap()
|
||||||
.wait()
|
.wait()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
Command::new("systemctl")
|
||||||
|
.arg("stop")
|
||||||
|
.arg("docker")
|
||||||
|
.spawn()
|
||||||
|
.unwrap()
|
||||||
|
.wait()
|
||||||
|
.unwrap();
|
||||||
if let Err(e) = export_blocking(&self.zfs_pool) {
|
if let Err(e) = export_blocking(&self.zfs_pool) {
|
||||||
log::error!("Error Exporting ZFS Pool: {}", e);
|
log::error!("Error Exporting ZFS Pool: {}", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user