Hi.
On Sun, Mar 10, 2019 at 01:03:47PM -0000, Curt wrote:
> On 2019-03-10, Eduardo M KALINOWSKI <eduardo@kalinowski.com.br> wrote:
> >>
> >> # directory name is crucial
> >> mkdir /etc/systemd/system/minissdpd.service.d
> >> # file name is not important
> >> cat > /etc/systemd/system/minissdpd.service.d/override.conf << EOF
> >> [Unit]
> >> After=sys-subsystem-net-devices-enp7s0.device sys-subsystem-net-devices-wlp6s0.device
> >> Requires=sys-subsystem-net-devices-enp7s0.device sys-subsystem-net-devices-wlp6s0.device
> >> EOF
> >>
> >> systemctl daemon-reload
> >
> > Or run
> >
> > systemctl edit minissdpd.service
> >
> > which will create the file in the appropriate location, open $EDITOR on
> > it, and run daemon-reload automatically afterwards.
> >
>
> I have
>
> After=network-online.target
> Wants=network-online.target
>
> as per this bug report:
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861231
That's good for listening INADDR_ANY, but it's not sufficient in this
particular case.
> Perhaps I'm missing something here.
network-online.target does not guarantee that specific network
interfaces will be present.
For instance, enp7s0 can be configured instantly (static IP assignment),
wlp6s0 can lag behind it (dhcp assignment).
Reco
So . . .
I did:
sudo systemctl edit minissdpd.service
entering this:
[Unit]
After=sys-subsystem-net-devices-enp7s0.device sys-subsystem-net-devices-wlp6s0.device
Requires=sys-subsystem-net-devices-enp7s0.device sys-subsystem-net-devices-wlp6s0.device
It created: /etc/systemd/system/minissdpd.service.d/override.conf:
doofus@doofus:~$ sudo ls /etc/systemd/system/minissdpd.service.d/override.conf
-rw-r--r-- 1 root root 182 Mar 10 11:23 /etc/systemd/system/minissdpd.service.d/override.conf
doofus@doofus:~$ sudo cat /etc/systemd/system/minissdpd.service.d/override.conf
[Unit]
After=sys-subsystem-net-devices-enp7s0.device sys-subsystem-net-devices-wlp6s0.device
Requires=sys-subsystem-net-devices-enp7s0.device sys-subsystem-net-devices-wlp6s0.device
But it did not start minissdpd.
I did:
sudo systemctl daemon-reload
But itdid not start minissdpd.
I rebooted.
But it did not start minissdpd.
Grrr . . .
Here is the minissdpd .service file:
doofus@doofus:~$ sudo ls /lib/systemd/system/minissdpd.service
-rw-r--r-- 1 root root 418 Feb 27 22:13 /lib/systemd/system/minissdpd.service
doofus@doofus:~$ sudo cat /lib/systemd/system/minissdpd.service
[Unit]
Description=keep memory of all UPnP devices that announced themselves
Documentation=man:minissdpd(1)
After=network-online.target
[Service]
Type=forking
EnvironmentFile=/etc/default/minissdpd
ExecStart=/usr/lib/minissdpd/minissdpd-systemd-wrapper ${MiniSSDPd_INTERFACE_ADDRESS} $MiniSSDPd_OTHER_OPTIONS
PrivateTmp=yes
LimitNOFILE=20
LimitNPROC=5
PIDFile=/run/minissdpd.pid
[Install]
WantedBy=multi-user.target
So, should I try manually editing /lib/systemd/system/minissdpd.service?