Better config fie handling for the asusd daemon

Should address #304
This commit is contained in:
Luke D. Jones
2023-01-05 19:56:51 +13:00
parent cbce854d1b
commit 19f82493de
7 changed files with 87 additions and 85 deletions

View File

@@ -27,8 +27,6 @@ use rog_profiles::Profile;
use tokio::time::sleep;
use zbus::SignalContext;
static PROFILE_CONFIG_PATH: &str = "/etc/asusd/profile.conf";
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut logger = env_logger::Builder::new();
@@ -98,7 +96,7 @@ async fn start_daemon() -> Result<(), Box<dyn Error>> {
}
if Profile::is_platform_profile_supported() {
let profile_config = ProfileConfig::load(PROFILE_CONFIG_PATH.into());
let profile_config = ProfileConfig::load();
match CtrlPlatformProfile::new(profile_config) {
Ok(ctrl) => {
let zbus = ProfileZbus(Arc::new(Mutex::new(ctrl)));