I've got a systemd service which I need to have run prior to networking having started and I'm struggling with it a little. According to this: Running Services After the Network is up I need to use Before=network-pre.target, however my service isn't starting.
root@server:~# systemctl list-dependencies my-script --reverse my-script.service ● └─network-pre.target (has a red dot next to it)
The actual unit itself:
[Unit] Description=My script Before=network-pre.target Wants=network-pre.target [Service] ExecStart=/etc/my-script Type=oneshot RemainAfterExit=yes [Install] WantedBy=multi-user.target