LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 05-17-2017, 09:56 AM   #1
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Rep: Reputation: Disabled
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.
 
Old 05-17-2017, 11:02 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,695

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
Quote:
Originally Posted by usao View Post
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)
 
Old 05-17-2017, 11:11 AM   #3
usao
Member
 
Registered: Dec 2011
Location: Chandler, AZ
Posts: 286

Original Poster
Rep: Reputation: Disabled
Where can I find details on how to create the Sxx and Kxx scripts for systemctl?
Better yet, an example would work best.
 
Old 05-17-2017, 01:54 PM   #4
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,695

Rep: Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716Reputation: 2716
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.
 
Old 05-18-2017, 01:02 PM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
debian emty init scripts /etc/init.d crowl Debian 5 10-16-2012 10:42 AM
[SOLVED] How to monitor init scripts in /etc/init.d/ in rhel 5 me_spearhead Red Hat 2 02-09-2011 10:41 PM
Diffrence /etc/init.d and /etc/init.d/rc?.d scripts veeruhs Linux - Server 3 07-29-2010 04:42 AM
[SOLVED] init scripts, variables in INIT INFO section catkin Linux - General 1 08-18-2009 02:02 PM
Init Scripts brazilian_user Linux - General 3 12-05-2006 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 03:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration