Hello everyone,
I have a service on my vm that should only start once ens18 (the connection to ethernet) is online and working.
I've tried two solutions:
However, the started service always reports
Is there anything I could do?
I have a service on my vm that should only start once ens18 (the connection to ethernet) is online and working.
I've tried two solutions:
Code:
[Unit]
Description=Fivem Server
Requires=systemd-networkd-wait-online
After=systemd-networkd-wait-online
[Service]
Type=simple
ExecStartPre=/usr/lib/systemd/systemd-networkd-wait-online -i ens18 -o routable
ExecStart=//START SOMETHING
User=fivem
[Install]
WantedBy=multi-user.target
Code:
[Unit]
Description=Fivem Server
BindsTo=sys-devices-pci0000:00-0000:00:12.0-virtio2-net-ens18.device
After=sys-devices-pci0000:00-0000:00:12.0-virtio2-net-ens18.device
[Service]
Type=simple
ExecStart=//START SOMETHING
User=fivem
[Install]
WantedBy=multi-user.target
However, the started service always reports
CURL error code 6 (Couldn't resolve host name
after a reboot.Is there anything I could do?