diff --git a/Cargo.toml b/Cargo.toml index 47b46d1..5b0bc53 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = [ [package] name = "snitch" description = "Intrusion detection and file integrity verification" -version = "0.1.5" +version = "0.1.8" edition = "2021" license = "MIT" readme = "README.md" diff --git a/build.rs b/build.rs deleted file mode 100644 index e4a387e..0000000 --- a/build.rs +++ /dev/null @@ -1,40 +0,0 @@ -use std::fs; -use std::path::Path; -use std::process::exit; - -static DEFAULT_CONFIG_PATH: &str = "/etc/snitch/"; - -/// Print debugging output to console as warning. -macro_rules! print_create_failure { - ($($tokens: tt)*) => { - println!("cargo:warning=Could not create {} - {}", DEFAULT_CONFIG_PATH, format!($($tokens)*)) - } -} - -/// Attempts to create /etc/snitch/config.yaml with a default configuration. -fn main() { - fs::create_dir(Path::new(DEFAULT_CONFIG_PATH)).unwrap_or_else(|error| { - let kind = error.kind(); - print_create_failure!("{}", kind); - exit(0); - }); - let out_dir = Path::new(DEFAULT_CONFIG_PATH); - let dest_path = Path::new(&out_dir).join("config.yaml"); - fs::write( - &dest_path, - "--- -directories: - - /bin - - /sbin - - /boot - - /root -sender: - telegram: - bot_token: MY_BOT_TOKEN - chat_id: MY_CHAT_ID -authentication_logs: /var/log/auth.log -", - ) - .unwrap(); - println!("cargo:rerun-if-changed=build.rs"); -}