Managing Compiled Applications with Systemd

Latest response

Hi guys,

in RHEL6, when you compile an application , you can put the start up script in /etc/init.d and symlink it to desired runlevel.

How is this done in RHEL7 ? How can I have a custom startup script managed by systemd?

Thanks

Responses

There are multiple ways to accomplish this. If you already have an init script for your application, systemd will allow you to use it -- it is backwards compatible with SysV init scripts, which makes it possible for you to just add your script to the desired rcX.d/ directory in /etc, and systemd will treat it as its own service unit.

Or you can write your own service file for systemd.

See the following resources for more information about systemd:

Thanks Robert. The RHEL7 admin guide does not explain how to accomplish what I am asking. I know I can use init scripts to start and stop the services. But I specifically wanted to use systemd.

Thanks always

Hi Arrey, does this solution help at all?

How to convert init scripts to systemd units files

We also have a more streamlined version that does not discuss init files:

How to make custom script that runs automatically during boot up in RHEL7?

br
Mark

[edit]Added second link