SHA256
Adding hive-up.tml config file, db auto creation, and a bit of refactoring.
This commit is contained in:
+4
-4
@@ -22,13 +22,13 @@ use serde::{Deserialize, Serialize};
|
||||
use std::fs;
|
||||
use toml;
|
||||
|
||||
const CONFIG_PATH: &str = "/etc/hive_up.toml";
|
||||
const CONFIG_PATH: &str = "/etc/hive-up.toml";
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct HiveConfig {
|
||||
// Matches [kernel] in TOML
|
||||
pub kernel: KernelConfig,
|
||||
// Updates process config
|
||||
pub kernel: Option<KernelConfig>,
|
||||
// Updates [update] in TOML
|
||||
pub update: UpdateConfig,
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ pub struct KernelConfig {
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct UpdateConfig {
|
||||
/// Interval between updates check in hours. 0 - no auto check for updates.
|
||||
pub updates_check_interval: u64,
|
||||
pub check_interval: u64,
|
||||
/// Tells hive-up to automatically download updates when awailable.
|
||||
pub download_updates: bool,
|
||||
/// Tells hive-up to automatically perform updates during system reboot.
|
||||
|
||||
Reference in New Issue
Block a user