LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   CentOS 7.3 init scripts (https://www.linuxquestions.org/questions/centos-111/centos-7-3-init-scripts-4175606124/)

usao 05-17-2017 09:56 AM

CentOS 7.3 init scripts
 
I have a database which I normally start with a S99 script and stop with a K01 script.
Im not sure how to set this up under CentOS 7.3. It appears as though you have to use systemctl, but I don't know how to setup custom scripts and set the Sxx and Kxx levels.

wpeckham 05-17-2017 11:02 AM

Quote:

Originally Posted by usao (Post 5711869)
I have a database which I normally start with a S99 script and stop with a K01 script.
Im not sure how to set this up under CentOS 7.3. It appears as though you have to use systemctl, but I don't know how to setup custom scripts and set the Sxx and Kxx levels.

You can set it up just as you would have under earlier versions of CentOS. While the BETTER way is to use the systemctl system, the old way IS still supported. After all systemctl services start on boot, it will look for init.d based scripts and start those as well. (At least on my systems, CentOS 7.2)

usao 05-17-2017 11:11 AM

Where can I find details on how to create the Sxx and Kxx scripts for systemctl?
Better yet, an example would work best.

wpeckham 05-17-2017 01:54 PM

You might check the example on this page: https://scottlinux.com/2014/12/08/ho...inux-centos-7/ and there is a link on that page to a more detailed page.

Google or duckduckgo can lead you to MANY more pages with examples.

ondoho 05-18-2017 01:02 PM

archlinux has been using systemd for a very long time, and their wiki has many good tips:
https://wiki.archlinux.org/index.php/Systemd
i think the most important thing to understand right now is that it doesn't really work sequentially; although you have "targets" and can configure a service to not start until a certain target is reached.


All times are GMT -5. The time now is 06:34 AM.