malwaredb 0.3.2

Service for storing malicious, benign, or unknown files and related metadata and relationships.
// SPDX-License-Identifier: Apache-2.0

//! Service installation.
//!
//! Supported operating systems:
//! * FreeBSD
//! * Linux systemd
//! * macOS
//! * Windows

use std::process::ExitCode;

#[cfg(target_os = "freebsd")]
mod freebsd;
#[cfg(target_os = "freebsd")]
pub use freebsd::Install;

#[cfg(target_os = "linux")]
mod systemd;
#[cfg(target_os = "linux")]
pub use systemd::Install;

#[cfg(target_os = "macos")]
mod launchctl;
#[cfg(target_os = "macos")]
pub use launchctl::Install;

#[cfg(all(
    not(target_os = "macos"),
    not(target_os = "linux"),
    not(target_os = "freebsd"),
    not(target_os = "windows")
))]
mod other;
#[cfg(all(
    not(target_os = "macos"),
    not(target_os = "linux"),
    not(target_os = "freebsd"),
    not(target_os = "windows")
))]
pub use other::Install;

#[cfg(target_os = "windows")]
mod windows;

#[cfg(target_os = "windows")]
pub use windows::Install;

pub(crate) trait Installer {
    fn do_install(&self) -> anyhow::Result<ExitCode>;
}