systemctl doesn't recognize my service: Default-Start contains no runlevels, aborting

I had the same error when porting a sysv script from a redhat box to ubuntu. I needed to add some headers to the script

### BEGIN INIT INFO
# Provides:          my-service-name
# Required-Start:    $all
# Required-Stop:
# Default-Start:     2 3 4 5
# Default-Stop:
# Short-Description: your description here
### END INIT INFO

found in https://askubuntu.com/questions/909523/default-start-contains-no-runlevels-aborting


The problem was the location of the file, on Ubuntu server it expects it in /etc/systemd/system, /etc/init.d/ is for legacy files.