Searching different forums didn't lead to much beyond installing some random person's script with root permission or doing hacks.
I've invested sometime to get init.d work on my phone and wanted to share the how to with you:
Root access (shell) [ I am using addonsu-14.1-arm if that make a difference ]
LineageOS 14 (not tested on other versions but should work)
1. mount your system partition as read/write
mount -oremount,rw /system
service init_d /system/bin/sh /system/bin/sysinit user root group root disabled oneshot seclabel u:r:sudaemon:s0 on property:sys.boot_completed=1 && property:sys.logbootcomplete=1 start init_d
/system/etc/init/ is android's version of linux's init.d but it have very different syntax and restricted set of commands.
the file init_d define a service called init_d which basically execute sysinit script (the script responsible for running /etc/init.d/ scripts).
the service is set to be disabled so it won't run by default. Finally I say that when the system finish booting start the service. the oneshot keyword is important because without the system will keep executing sysinit each time it exit.
the seclabel define SELinux label for this service, this one should give it full access