debug log config path
This commit is contained in:
parent
6ca710ded6
commit
40fd1c4751
2
debian/postinst
vendored
2
debian/postinst
vendored
@ -8,7 +8,7 @@ if [ -f /run/.containerenv ] || [ -f /run/.dockerenv ] || [ -f /.dockerenv ] ||
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! $(id -u $sysUser 2>/dev/null || echo -1) -ge 0 ]; then
|
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
|
fi
|
||||||
|
|
||||||
if [ ! -d "/usr/share/ffplayout/db" ]; then
|
if [ ! -d "/usr/share/ffplayout/db" ]; then
|
||||||
|
@ -82,7 +82,7 @@ impl CurrentProgram {
|
|||||||
let json = read_json(&self.config, None, self.is_terminated.clone(), seek, 0.0);
|
let json = read_json(&self.config, None, self.is_terminated.clone(), seek, 0.0);
|
||||||
|
|
||||||
if let Some(file) = &json.current_file {
|
if let Some(file) = &json.current_file {
|
||||||
info!("Read Playlist: <b><magenta>{}</></b>", file);
|
info!("Read Playlist: <b><magenta>{file}</></b>");
|
||||||
}
|
}
|
||||||
|
|
||||||
self.json_path = json.current_file;
|
self.json_path = json.current_file;
|
||||||
|
@ -200,6 +200,11 @@ fn main() {
|
|||||||
|
|
||||||
status_file(&config.general.stat_file, &playout_stat);
|
status_file(&config.general.stat_file, &playout_stat);
|
||||||
|
|
||||||
|
debug!(
|
||||||
|
"Use config: <b><magenta>{}</></b>",
|
||||||
|
config.general.config_path
|
||||||
|
);
|
||||||
|
|
||||||
match config.out.mode {
|
match config.out.mode {
|
||||||
// write files/playlist to HLS m3u8 playlist
|
// write files/playlist to HLS m3u8 playlist
|
||||||
HLS => write_hls(&config, play_control, playout_stat, proc_control),
|
HLS => write_hls(&config, play_control, playout_stat, proc_control),
|
||||||
|
@ -146,6 +146,9 @@ pub struct General {
|
|||||||
pub help_text: String,
|
pub help_text: String,
|
||||||
pub stop_threshold: f64,
|
pub stop_threshold: f64,
|
||||||
|
|
||||||
|
#[serde(default, skip_serializing, skip_deserializing)]
|
||||||
|
pub config_path: String,
|
||||||
|
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
pub stat_file: String,
|
pub stat_file: String,
|
||||||
|
|
||||||
@ -342,6 +345,8 @@ impl PlayoutConfig {
|
|||||||
serde_yaml::from_reader(f).expect("Could not read config file.");
|
serde_yaml::from_reader(f).expect("Could not read config file.");
|
||||||
config.general.generate = None;
|
config.general.generate = None;
|
||||||
|
|
||||||
|
config.general.config_path = config_path.to_string_lossy().to_string();
|
||||||
|
|
||||||
config.general.stat_file = home_dir()
|
config.general.stat_file = home_dir()
|
||||||
.unwrap_or_else(env::temp_dir)
|
.unwrap_or_else(env::temp_dir)
|
||||||
.join(if config.general.stat_file.is_empty() {
|
.join(if config.general.stat_file.is_empty() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user