mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-21 05:00:16 +00:00
minidlna: use journalctl for logging, systemd for runtimedir
This commit is contained in:
parent
4d87926795
commit
72cd570421
|
@ -60,7 +60,7 @@ in
|
|||
port=${toString port}
|
||||
friendly_name=${config.networking.hostName} MiniDLNA
|
||||
db_dir=/var/cache/minidlna
|
||||
log_dir=/var/log/minidlna
|
||||
log_level=warn
|
||||
inotify=yes
|
||||
${concatMapStrings (dir: ''
|
||||
media_dir=${dir}
|
||||
|
@ -83,21 +83,18 @@ in
|
|||
|
||||
preStart =
|
||||
''
|
||||
mkdir -p /var/cache/minidlna /var/log/minidlna /run/minidlna
|
||||
chown minidlna /var/cache/minidlna /var/log/minidlna /run/minidlna
|
||||
mkdir -p /var/cache/minidlna
|
||||
chown -R minidlna:minidlna /var/cache/minidlna
|
||||
'';
|
||||
|
||||
# FIXME: log through the journal rather than
|
||||
# /var/log/minidlna. The -d flag does that, but also raises
|
||||
# the log level to debug...
|
||||
serviceConfig =
|
||||
{ User = "minidlna";
|
||||
Group = "nogroup";
|
||||
Group = "minidlna";
|
||||
PermissionsStartOnly = true;
|
||||
Type = "forking";
|
||||
RuntimeDirectory = "minidlna";
|
||||
PIDFile = "/run/minidlna/pid";
|
||||
ExecStart =
|
||||
"@${pkgs.minidlna}/sbin/minidlnad minidlnad -P /run/minidlna/pid" +
|
||||
"${pkgs.minidlna}/sbin/minidlnad -S -P /run/minidlna/pid" +
|
||||
" -f ${pkgs.writeText "minidlna.conf" cfg.config}";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue