diff --git a/debian/postinst b/debian/postinst index 7c744de7..df00d9a2 100644 --- a/debian/postinst +++ b/debian/postinst @@ -8,7 +8,7 @@ if [ -f /run/.containerenv ] || [ -f /run/.dockerenv ] || [ -f /.dockerenv ] || fi if [ ! $(id -u $sysUser 2>/dev/null || echo -1) -ge 0 ]; then - adduser --system $sysUser + adduser --system --create-home $sysUser > /dev/null || adduser --system --home "/home/$sysUser" $sysUser fi if [ ! -d "/usr/share/ffplayout/db" ]; then diff --git a/ffplayout-engine/src/input/playlist.rs b/ffplayout-engine/src/input/playlist.rs index 5b90b14d..e296acc1 100644 --- a/ffplayout-engine/src/input/playlist.rs +++ b/ffplayout-engine/src/input/playlist.rs @@ -82,7 +82,7 @@ impl CurrentProgram { let json = read_json(&self.config, None, self.is_terminated.clone(), seek, 0.0); if let Some(file) = &json.current_file { - info!("Read Playlist: {}", file); + info!("Read Playlist: {file}"); } self.json_path = json.current_file; diff --git a/ffplayout-engine/src/main.rs b/ffplayout-engine/src/main.rs index 4548f15f..cfeae085 100644 --- a/ffplayout-engine/src/main.rs +++ b/ffplayout-engine/src/main.rs @@ -200,6 +200,11 @@ fn main() { status_file(&config.general.stat_file, &playout_stat); + debug!( + "Use config: {}", + config.general.config_path + ); + match config.out.mode { // write files/playlist to HLS m3u8 playlist HLS => write_hls(&config, play_control, playout_stat, proc_control), diff --git a/lib/src/utils/config.rs b/lib/src/utils/config.rs index 3b55668e..a2d1bbcb 100644 --- a/lib/src/utils/config.rs +++ b/lib/src/utils/config.rs @@ -146,6 +146,9 @@ pub struct General { pub help_text: String, pub stop_threshold: f64, + #[serde(default, skip_serializing, skip_deserializing)] + pub config_path: String, + #[serde(default)] pub stat_file: String, @@ -342,6 +345,8 @@ impl PlayoutConfig { serde_yaml::from_reader(f).expect("Could not read config file."); config.general.generate = None; + config.general.config_path = config_path.to_string_lossy().to_string(); + config.general.stat_file = home_dir() .unwrap_or_else(env::temp_dir) .join(if config.general.stat_file.is_empty() {