Adding hive-up.tml config file, db auto creation, and a bit of refactoring.

This commit is contained in:
2026-09-05 23:24:08 +02:00
parent 605faa3c19
commit 17cea4b89e
9 changed files with 46 additions and 36 deletions
+4 -4
View File
@@ -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.