I have created systemd script - /etc/systemd/system/test123.service which inside is set to execute on start/stop the service in /etc/init.d/foo.sh with parameters start/stop,and foo.sh when started/stopped directly starts/stops the service The problem I face is, now I want to upgrade to systemd from init.d and when foo.sh is active ,the systemd script shows to be inactive via the command "systemctl status test123.service" .Is this behaviour expected or something can be changed in order systemd to see foo.sh status ?

  • You've hand-duplicated a procedure that systemd already does for you. unix.stackexchange.com/a/233581/5132
    – JdeBP
    Commented Sep 13, 2018 at 12:13
  • I believe systemd has kind of sys V init compatibility, so I don't think that's a good idea of writing a new service but not deleting original initscript service.Maybe just don't do anything (forget about systemd service file and take advantage of compatibility). Or RTFD and write a new service that call the actual service program and delete foo.sh. Commented Sep 13, 2018 at 12:19
  • Yeah I was thinking before starting the systemd ,just to stop and delete the init.d and then cleanly start using systemd?
    – Gordon
    Commented Sep 13, 2018 at 12:26

1 Answer 1


The .service file and the init script must have the same name, is the initscript is called /etc/init.d/foo the service file must be called foo.service

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .