Running reporting script when OSMC boots

I have a script that I run via /etc/rc.local on startup of all of my Raspberry Pi units.
The purpose of the script is to report the IP address of the unit via email to me so I can find it on the network. This has worked fine on Raspbian in about 6-7 units, but it does not seem to work on OSMC.
The lines in rc.local calling the script are as follows:

#Send IP address report after a start delay of 10 seconds sleep 10 /home/osmc/ & exit 0
The sleep is there to ensure that the network is up when the ipreport script is executed since it sends the data to a php script on my website.
Is there a way to do this on OSMC?

Use a systemd target and wait for network to be online (see mediacenter.service for example) and enable Wait for Network in My OSMC

Wouldn’t DHCP and DNS make your live easier?

I am using DHCP on my networks and thereby the RPi is given an IP address, however when it moves to a different network (which happens frequently with my units) they get different addresses.
Local DNS is something that I have never been able to get working in my own networks and additionally the RPis are not always on a network I manage…
But via my on-boot script I get an instant message on startup telling me both the Ethernet and WiFi IP addresses along with the external address on the Internet and of course the hostname so I know which RPi was booting…

OK, I found the file mediacenter.service in /etc/systemd/system/
Do you mean that I should create a file like that for my on-boot script for example by copy/edit the existing file?

Description = media center application
After = mysql.service
Wants =

Type = simple
TimeoutStopSec = 20
ExecStart = /usr/bin/mediacenter
ExecStopPost = /usr/bin/mediacenter stop
Restart = on-abort

WantedBy =
If so I probably need to go the systemd course first so I don’t screw stuff up…

OH, by the way I had a look at MyOsmc and I could not find any enabler for “Wait for Network” there. Exactly in which category would that be found?