diff --git a/src/config.rs b/src/config.rs index 629fa4d..fc4ff22 100644 --- a/src/config.rs +++ b/src/config.rs @@ -18,7 +18,8 @@ pub struct PackageDescription { /// Describes the application itself. #[derive(Deserialize, Serialize, Clone)] pub struct GeneralConfig { - pub name : String + pub name : String, + pub installing_message : String } #[derive(Deserialize, Serialize, Clone)] diff --git a/src/rest.rs b/src/rest.rs index fb74edf..aaa95ad 100644 --- a/src/rest.rs +++ b/src/rest.rs @@ -14,6 +14,7 @@ use std::error::Error; use std::net::{SocketAddr, IpAddr, Ipv4Addr}; use std::thread::{self, JoinHandle}; use std::str::FromStr; +use std::process::exit; use assets; @@ -114,6 +115,9 @@ impl WebServer { Some(serde_json::to_string(&response).unwrap()) }, + "exit" => { + exit(0); + }, _ => None } } diff --git a/static/index.html b/static/index.html index fc036f5..e14c60d 100644 --- a/static/index.html +++ b/static/index.html @@ -33,7 +33,7 @@ -