Let's say the SysV Init Script is called foo (the file /etc/init.d/foo):
-
Start the service through Systemd:
systemctl start foo -
systemd-sysv-generator will generate this file
/run/systemd/generator.late/foo.service, copy this file to/etc/systemd/systemby running:cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service -
Edit
/etc/systemd/system/foo.serviceby runningsystemctl edit foo.service, add in the following line tofoo.servie(this makes the service installable)[Install] WantedBy=multi-user.target -
Enable the server:
systemd enable foo.service