Hi Jakobus,

>                    Aug 17 21:36:51 aldebaran minidlnad[537]:
>                    utils.c:277: warn: make_dir: cannot create
>                    directory '/run/minidlna'
>                    Aug 17 21:36:51 aldebaran minidlnad[537]:
>                    minidlna.c:434: error: Unable to create pidfile
>                    directory: /run/minidlna/minidlna.pid

I think you need to make sure that the directory exists when minidlna
starts, because minidlna can't create it when it is run without root
privileges.

The "right way" to do this using systemd is probably a tmpfiles.d file
similar to the one from Arch Linux (probably best to put it in
/etc/tmpfiles.d/minidlna.conf in your case):
> d /run/minidlna 0755 minidlna minidlna -

And maybe also add this line, so you can safely rm -r /var/cache &&
systemd-tmpfiles without breaking minidlna (only most other parts of
your system) if you ever want to do that:
> d /var/cache/minidlna 0755 minidlna minidlna -

Running systemd-tmpfiles after adding that file should create the
missing directories with correct permissions if they don't exist.

The debian init script for minidlna makes sure to create the
/run/minidlna directory before starting minidlna, so you should make
sure that systemd does the same (through systemd-tmpfiles) if you decide
to use a proper systemd service unit instead of the init script.

Cheers,
Florian

Reply via email to