Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've added the following and confirmed the script works as it is by first running it. Why isn't this script then running when the server starts up each time? Not sure what I'm missing.

Confirmed working sh myscript.sh

file is in /etc/init.d/myscript.sh

share|improve this question
add comment

1 Answer

/etc/init.d/ doesn't mean "always-start-everything-inside". There're /etc/rcN.d/ directories which define subsets of /etc/init.d/ for each possible system "run-level". Try man chkconfig — at least on RedHat's derivatives it explains the system. I suppose SuSe should have one too.

P. S. Also, for some trivial init-scripts, which need not to have dependencies info and so on, /etc/rc.local can be used instead. It's a bit ugly but sometimes KISS principle overrides this by its own beauty. ;-)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.