init bastion

This commit is contained in:
Nadja Reitzenstein 2021-10-27 17:03:50 +02:00
parent 4ff6263db7
commit 082b4cc28a
2 changed files with 21 additions and 14 deletions

View File

@ -23,6 +23,10 @@ lazy_static = "1.4.0"
uuid = { version = "0.8.2", features = ["serde", "v4"] }
async-trait = "0.1.51"
# Runtime
bastion = "0.4"
nuclei = { version = "0.1.3" }
# Catch&Handle POSIX process signals
signal-hook = "0.3.9"

View File

@ -24,23 +24,26 @@ pub mod error;
pub mod config;
mod permissions;
/*
use clap::{App, Arg};
mod runtime {
use bastion::prelude::*;
use std::io;
use std::io::Write;
use std::path::PathBuf;
use std::str::FromStr;
pub fn startup() {
let config = Config::new().hide_backtraces();
use std::sync::Arc;
Bastion::init_with(config);
use smol::Executor;
Bastion::start();
use error::Error;
let sup = Bastion::supervisor(|sp| {
sp .with_strategy(SupervisionStrategy::OneForAll)
.children(|children| {
children
})
}).expect("Failed to create supervisor");
}
use slog::Logger;
use paho_mqtt::AsyncClient;
use crate::config::Config;
*/
pub fn run() {
Bastion::block_until_stopped()
}
}