test: config search path (using docker)
This commit is contained in:
parent
1b5c48071c
commit
6e85e12993
|
@ -10,7 +10,8 @@
|
|||
"dustypomerleau.rust-syntax",
|
||||
"1YiB.rust-bundle",
|
||||
"serayuzgur.crates",
|
||||
"tamasfe.even-better-toml"
|
||||
"tamasfe.even-better-toml",
|
||||
"ms-azuretools.vscode-docker"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
FROM ubuntu:22.04
|
||||
|
||||
ADD target/debug/init /usr/local/bin/init
|
||||
ADD docker/ /
|
||||
|
||||
RUN chmod ugo+x /etc/wingmate/services/one && chmod ugo+x /etc/wingmate/services/two.sh && \
|
||||
chmod ugo-x /etc/wingmate/services/three.sh
|
||||
|
||||
CMD [ "/usr/local/bin/init" ]
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec sleep 1
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec sleep 1
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec sleep 1
|
|
@ -6,5 +6,6 @@ use std::error as std_err;
|
|||
|
||||
pub async fn start() -> Result<(), Box<dyn std_err::Error>> {
|
||||
let _config = config::Config::find(vec![String::from("/etc/wingmate")])?;
|
||||
dbg!(_config);
|
||||
daemon::start().await
|
||||
}
|
|
@ -4,11 +4,13 @@ use std::error as std_error;
|
|||
use crate::init::error as wingmate_error;
|
||||
use nix::unistd::{access, AccessFlags};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum Command {
|
||||
ShellPrefixed(String),
|
||||
Direct(String)
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Config {
|
||||
pub services: Vec<Command>,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue